/* 선긋기 놀이 (/play/line/) and 미로찾기 놀이 (/play/maze/): the level cards, the full-screen board, the friend picker.
   site/play_trace.js, pipeline/site_play_trace.py */
.pt-head .post-head-in { grid-template-columns: 1fr; }
.pt-head .date { max-width: 46em; }
.pt-tipline { margin: 0 0 18px; font-size: 15px; color: #6b5a44; }
.pt-warn { padding: 8px 12px; border-radius: 12px; background: #ffe9b8; font-size: 14.5px; }
.pt-headrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 6px; }
.pt-headrow h2, .pt-friends h2 { font-family: var(--display); font-weight: 400; font-size: clamp(24px, 3.2vw, 30px); line-height: 1.25; }
.pt-total { display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px 6px 12px; border-radius: 99px; background: #fff; box-shadow: var(--lift-sm);
  font-family: var(--display); font-size: 18px; color: #4a3a28; }
.pt-total[hidden] { display: none; }
.pt-total i, .pt-count i { font-style: normal; color: #ffb400; font-size: 26px; line-height: 1; }
.pt-total b { font-weight: 400; font-size: 24px; }
.pt-group h3 { margin: 22px 0 12px; font-family: var(--display); font-weight: 400; font-size: 22px; }
.pt-group h3 small { font-family: var(--body); font-size: 14px; color: #a08c70; margin-left: 6px; }
.pt-levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.pt-lv { position: relative; display: block; padding: 10px 10px 12px; border: 4px solid #f1e3c8; border-radius: 24px; background: #fff; color: #4a3a28;
  text-decoration: none; text-align: center; box-shadow: var(--lift-sm); transition: transform .15s, border-color .15s; -webkit-tap-highlight-color: transparent; }
.pt-lv:hover, .pt-lv:focus-visible { transform: translateY(-3px); border-color: #ff9b4a; }
.pt-lv:active { transform: scale(.97); }
.pt-prev { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; border-radius: 14px; background: #fff7e6; }
.pt-lv b { display: block; margin-top: 8px; font-family: var(--display); font-weight: 400; font-size: 21px; line-height: 1.2; }
.pt-lv b small { font-family: var(--body); font-size: 13px; color: #a08c70; }
.pt-lv-st { position: absolute; top: 2px; right: 2px; padding: 3px 11px; border-radius: 99px; background: #ffc52e; color: #4a2610;
  font-family: var(--display); font-size: 16px; box-shadow: var(--lift-sm); transform: rotate(6deg); }
.pt-lv-st[hidden] { display: none; }
.pt-friends { margin: 34px 0 6px; }
.pt-friends[hidden] { display: none; }
.pt-friend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-top: 12px; }
.pt-friend { border: 0; border-radius: 18px; padding: 8px 6px; background: #fff; box-shadow: var(--lift-sm); cursor: pointer; color: #4a3a28; font: inherit; }
.pt-friend img { display: block; width: 100%; height: 68px; object-fit: contain; }
.pt-friend b { display: block; margin-top: 4px; font-family: var(--display); font-weight: 400; font-size: 14px; line-height: 1.15; }
.pt-steps { list-style: decimal; padding-left: 1.4em; }
.pt-steps li + li { margin-top: 8px; }
.pt-steps li::marker { font-family: var(--display); color: var(--orange); }
.pt-how { margin-top: 26px; }

/* the board: full screen over the page */
html.pt-lock, html.pt-lock body { overflow: hidden; overscroll-behavior: none; }
.pt-ed { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; background: #fff1d4; touch-action: manipulation;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.pt-ed[hidden], .pt-end[hidden], .pt-who[hidden] { display: none; }
.pt-top { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left));
  background: #fff; border-bottom: 3px solid #f1e3c8; }
.pt-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 64px; height: 64px; padding: 0 12px; border: 0; border-radius: 22px;
  background: #f6ead2; color: #4a3a28; font-family: var(--display); font-size: 18px; cursor: pointer; box-shadow: 0 4px 0 #dfcba4; -webkit-tap-highlight-color: transparent; }
.pt-ic:active { transform: translateY(3px); box-shadow: 0 1px 0 #dfcba4; }
.pt-ic svg { width: 34px; height: 34px; }
.pt-hint { background: #fff3c4; box-shadow: 0 4px 0 #ecd27a; padding: 0 16px 0 10px; }
#pt-mute[aria-pressed="true"] .pt-off, #pt-mute[aria-pressed="false"] .pt-on { display: none; }
#pt-mute[aria-pressed="false"] { color: #b3a085; }
.pt-whob { flex: none; width: 64px; height: 64px; padding: 4px; border: 3px solid #ff9b4a; border-radius: 50%; background: #fff7e6; cursor: pointer; overflow: hidden;
  -webkit-tap-highlight-color: transparent; }
.pt-whob img { width: 100%; height: 100%; object-fit: contain; }
.pt-whob img.card { object-fit: cover; border-radius: 50%; }
.pt-whob:active { transform: scale(.94); }
.pt-title { flex: 1; min-width: 0; margin: 0; line-height: 1.2; color: #4a3a28; overflow: hidden; }
.pt-title b { display: block; font-family: var(--display); font-weight: 400; font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-title span { display: block; font-size: 14px; color: #8a7458; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-count { flex: none; display: inline-flex; align-items: center; gap: 4px; margin: 0; padding: 4px 14px 4px 10px; border-radius: 99px; background: #fff7e0;
  font-family: var(--display); font-size: 24px; color: #4a3a28; }
.pt-count i { font-size: 30px; }
.pt-count b { font-weight: 400; }
.pt-count.pop { animation: pt-pop .7s ease-out; }
@keyframes pt-pop { 30% { transform: scale(1.5) rotate(-8deg); } 60% { transform: scale(.92); } }
.pt-stage { position: relative; flex: 1; min-height: 0; }
#pt-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: pointer; }
.pt-end { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 12px max(16px, env(safe-area-inset-bottom)); text-align: center;
  background: linear-gradient(rgba(255, 241, 212, 0), rgba(255, 241, 212, .96) 34%); animation: pt-up .35s ease-out; }
@keyframes pt-up { from { transform: translateY(40px); opacity: 0; } }
.pt-yay { margin: 0 0 12px; font-family: var(--display); font-size: clamp(30px, 6vw, 48px); line-height: 1.1; color: #e2650c; text-shadow: 0 3px 0 #fff, 0 -2px 0 #fff, 3px 0 0 #fff, -3px 0 0 #fff; }
.pt-end-btns { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.pt-big { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 64px; padding: 10px 24px; border: 0; border-radius: 99px;
  background: #fff; color: #4a3a28; font-family: var(--display); font-size: 22px; line-height: 1; text-decoration: none; cursor: pointer;
  box-shadow: 0 5px 0 #dfcba4, var(--lift-sm); -webkit-tap-highlight-color: transparent; }
.pt-big:active { transform: translateY(4px); box-shadow: 0 1px 0 #dfcba4; }
.pt-big.main { min-height: 76px; padding: 12px 40px; background: #ff7a1a; color: #fff; font-size: 30px; box-shadow: 0 6px 0 #c9560a, var(--lift-sm); animation: pt-pulse 1.3s ease-in-out infinite; }
.pt-big.main:active { box-shadow: 0 1px 0 #c9560a; }
@keyframes pt-pulse { 50% { transform: scale(1.06); } }
.pt-big.ghost { min-height: 52px; padding: 8px 18px; background: transparent; box-shadow: inset 0 0 0 2px #d9c39a; font-size: 17px; color: #7a5236; }

/* who walks the path */
.pt-who { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 12px; background: rgba(74, 38, 16, .45); }
.pt-who-in { position: relative; display: flex; flex-direction: column; width: min(900px, 100%); max-height: 100%; border-radius: 28px; background: #fff7e6; box-shadow: var(--lift); overflow: hidden; }
.pt-who-x { align-self: flex-end; margin: 10px 12px 4px; min-height: 56px; font-size: 19px; }
.pt-who-list { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; padding: 0 14px 18px; }
.pt-who-list h3 { margin: 12px 2px 8px; font-family: var(--display); font-weight: 400; font-size: 20px; color: #4a3a28; }
.pt-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.pt-tile { min-height: 112px; padding: 8px 6px; border: 3px solid #f1e3c8; border-radius: 20px; background: #fff; color: #4a3a28; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pt-tile:active { transform: scale(.95); border-color: #ff9b4a; }
.pt-tile img { display: block; width: 100%; height: 70px; object-fit: contain; }
.pt-tile i { display: grid; place-items: center; width: 70px; height: 70px; margin: 0 auto; border-radius: 50%; background: #ffc52e; color: #fff; font-family: var(--display); font-style: normal; font-size: 44px; }
.pt-tile b { display: block; margin-top: 5px; font-family: var(--display); font-weight: 400; font-size: 14px; line-height: 1.15; }

@media (max-width: 560px) {
  .pt-levels { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .pt-lv b { font-size: 18px; }
  .pt-top { gap: 6px; padding-top: 6px; padding-bottom: 6px; }
  .pt-ic { min-width: 64px; height: 64px; padding: 0 8px; border-radius: 20px; }   /* still a whole fingertip on a phone */
  .pt-ic svg { width: 30px; height: 30px; }
  .pt-hint span { display: none; }
  .pt-hint { padding: 0 8px; }
  .pt-whob { width: 64px; height: 64px; }
  .pt-title b { font-size: 17px; }
  .pt-title span { display: none; }
  .pt-count { font-size: 20px; padding: 2px 10px 2px 6px; }
  .pt-count i { font-size: 24px; }
  .pt-big { min-height: 64px; padding: 8px 18px; font-size: 19px; }
  .pt-big.main { min-height: 66px; padding: 10px 30px; font-size: 26px; }
  .pt-big.ghost { min-height: 46px; font-size: 15px; }
  .pt-tiles { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 430px) {   /* no room for the level name next to five round buttons; a child does not read it anyway */
  .pt-title { visibility: hidden; }
  .pt-count { padding: 2px 8px 2px 4px; }
}
@media (max-height: 460px) {
  .pt-top { padding-top: 4px; padding-bottom: 4px; }
  .pt-ic, .pt-whob { height: 48px; }
  .pt-whob { width: 48px; }
  .pt-title span { display: none; }
  .pt-yay { font-size: 26px; margin-bottom: 6px; }
  .pt-big { min-height: 48px; font-size: 18px; }
  .pt-big.main { min-height: 54px; font-size: 22px; }
}
