.playtown-entry { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; grid-column: 1 / -1; grid-row: 4; order: 4; margin: 8px 0; }
.playtown-entry button { min-height: 58px; border: 1px solid #86b7ae; border-bottom: 4px solid #325d61; border-radius: 14px; background: linear-gradient(145deg,#eee0b9,#e5bd88); color: #244654; font-weight: 900; font-size: .8125rem; padding: 6px 3px; }
.playtown-entry button span { display: block; font-size: 1.35rem; }
#playtownDialog { width: min(1060px,100%); max-width: 100%; height: min(760px,100dvh); max-height: 100dvh; padding: 0; border: 2px solid #5e8c8e; border-radius: 22px; color: #244654; background: #f6ecd5; overflow: hidden; box-shadow: 0 15px 70px #102c3ac9; }
#playtownDialog::backdrop { background: #0b2334b8; backdrop-filter: blur(5px); }
#playtownDialog[open] { display: flex; flex-direction: column; }
#playtownDialog * { box-sizing: border-box; overflow-wrap: anywhere; }
#playtownDialog button, #playtownDialog select { min-height: 44px; border: 1px solid #86a39a; border-radius: 11px; padding: 8px 12px; background: #fff9e9; color: #284d59; font: inherit; font-weight: 800; cursor: pointer; }
#playtownDialog button:focus-visible, #playtownDialog select:focus-visible { outline: 3px solid #db694f; outline-offset: 2px; }
#playtownDialog button:disabled { opacity: .65; cursor: default; }
#playtownDialog button[aria-pressed=true], #playtownDialog .pt-primary { background: #276d70; color: #fff9e8; border-color: #24565b; box-shadow: 0 3px #15464e; }
.pt-header { flex: 0 0 auto; display: flex; align-items: center; gap: 9px; padding: 8px 12px; background: #234955; color: #fff0c8; }
.pt-header h2 { flex: 1; min-width: 0; font-size: 1rem; font-weight: 900; margin: 0; }
#playtownBody { min-height: 0; overflow-y: auto; padding: 12px; overscroll-behavior: contain; font-size: .875rem; }
.pt-subtitle { margin: 0 0 12px; line-height: 1.5; color: #506c6c; }
.pt-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
#playtownDialog .pt-card { text-align: left; padding: 0; overflow: hidden; border-radius: 16px; background: #fff9e9; border-bottom: 4px solid #b5a990; }
.pt-card-art { height: 100px; position: relative; display: flex; align-items: center; justify-content: center; font-size: 3rem; background: radial-gradient(ellipse at 25% 20%,#fff9e9 0 15%,transparent 16%),linear-gradient(150deg,#bbd8c5,#e2ca9d); }
.pt-card-art::before { content: ''; position: absolute; width: 76%; height: 38px; border: 8px solid #fff0c8; border-radius: 50%; transform: rotate(-12deg); box-shadow: 0 4px #659396, inset 0 0 0 4px #709791; }
.pt-card-art span { position: relative; filter: drop-shadow(0 5px 1px #3b5a5640); }
.pt-card:nth-child(2n) .pt-card-art { background: linear-gradient(145deg,#f6dfb6,#e9a495); }
.pt-card:nth-child(3n) .pt-card-art { background: linear-gradient(145deg,#e2dbf2,#99bcd0); }
.pt-card strong, .pt-card small { display: block; padding: 8px 12px 0; }
.pt-card strong { font-size: 1rem; }
.pt-card small { padding-bottom: 12px; line-height: 1.4; font-weight: 500; }
.pt-activity { display: grid; grid-template-columns: minmax(0,1fr) 230px; gap: 12px; align-items: start; }
.pt-scene { position: relative; width: 100%; min-width: 0; }
#playtownCanvas { display: block; width: 100%; height: auto; aspect-ratio: 16/9; border-radius: 14px; border: 2px solid #8aab9c; touch-action: none; background: #ded1ab; }
.pt-controls { display: flex; flex-direction: column; gap: 8px; }
.pt-controls p { margin: 0; }
.pt-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pt-row > button { flex: 1; }
.pt-controls label { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.pt-controls label select { flex: 1; min-width: 90px; max-width: 100%; }
.pt-status { padding: 8px 10px; margin: 8px 0 0; min-height: 38px; background: #e6dfc9; border-radius: 9px; font-weight: 800; }
.pt-help { line-height: 1.5; margin-top: 10px; }
.pt-help summary { min-height: 44px; cursor: pointer; padding-top: 10px; font-weight: 800; }
.pt-help p { color: #526864; margin: 4px 0; }
.pt-rewards { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px dashed #9bafa0; margin-top: 14px; padding-top: 10px; }
.pt-rewards small { flex: 1; line-height: 1.4; }
.pt-map { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; padding: 18px; border: 2px solid #8cad96; border-radius: 18px; background: radial-gradient(ellipse at 20% 30%,#fff5d1 0 8%,transparent 9%),repeating-linear-gradient(20deg,#b2d0b3 0 40px,#a7c8ac 40px 44px,#c1d5ac 44px 88px); }
#playtownDialog .pt-destination { min-height: 100px; background: #fff6d9ed; box-shadow: 0 5px #7b9985; }
.pt-destination span { display: block; font-size: 1.7rem; }
.pt-list { display: grid; gap: 9px; }
.pt-request { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; padding: 12px; background: #fff9e9; border: 1px solid #b4c3a8; border-radius: 12px; }
.pt-request h3 { margin: 0; font-size: .95rem; }
.pt-request button { flex-shrink: 0; }
.pt-puzzle { position: absolute; left: 23.4375%; top: 8.3333%; width: 46.875%; height: 83.3333%; display: grid; grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(3,1fr); gap: 0; }
#playtownDialog .pt-puzzle button { min-height: 0; padding: 0; background: transparent; border: 1px solid #3f6c6940; border-radius: 8px; color: transparent; }
.pt-book-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; margin: 10px 0 18px; }
.pt-stamp { padding: 12px 5px; text-align: center; border: 2px dashed #8ca293; border-radius: 14px; background: #ddd8c4; opacity: .75; }
.pt-stamp.earned { border-style: solid; background: #fff7d9; opacity: 1; box-shadow: 0 3px #b7b096; }
.pt-stamp b { display: block; font-size: 1.75rem; margin-bottom: 4px; }
.pt-stamp small { display: block; font-size: .75rem; }
@media (max-width: 700px) { .pt-activity { grid-template-columns: 1fr; } .pt-controls { flex-direction: row; flex-wrap: wrap; } .pt-controls > * { flex: 1 1 130px; } .pt-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .pt-book-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-height: 500px) and (min-width: 600px) { #playtownDialog { height: 100dvh; border-radius: 10px; } .pt-header { padding: 3px 8px; } #playtownBody { padding: 6px 10px; } .pt-activity { grid-template-columns: minmax(0,1fr) 200px; } .pt-controls { flex-direction: column; gap: 4px; } .pt-controls > * { flex: initial; } #playtownCanvas { max-height: calc(100dvh - 120px); object-fit: contain; } .pt-scene { max-width: calc((100dvh - 120px) * 1.7778); } .pt-card-art { height: 60px; } .pt-help { margin-top: 0; } .playtown-entry button { min-height: 44px; } .playtown-entry button span { display: inline; font-size: 1rem; margin-right: 4px; } }
@media (prefers-reduced-motion: reduce) { #playtownDialog * { scroll-behavior: auto; } }
