/* 치이카와 긁는 복권(v4.35, scratch.js) — 당첨표는 slots.css .slot-table 모양을 같이 씀 */
.scr-open { flex: none; white-space: nowrap; background: #ffe3ec; border-color: #c2577a; color: #8a2f52; }
.social-head .scr-open { margin-left: auto; }
.social-head .scr-open + .slot-open { margin-left: 0; }  /* slots.css가 슬롯 버튼을 오른쪽으로 밀어 둠 → 복권이 대신 밂 */
.update-dlg.scr-dlg { width: min(340px, calc(100vw - 24px)); max-height: calc(100dvh - 16px); overflow-y: auto; }
.scr-dlg .scr-sub { margin-bottom: 10px; font-size: 0.8rem; }
.scr-ticket { background: linear-gradient(160deg, #ffd9e4, #ffeeb8); border: 2px solid var(--ink); border-radius: 18px; padding: 8px 10px 6px; box-shadow: inset 0 -4px 0 rgba(61,48,43,.14); }
.scr-band { font: 0.82rem var(--display); color: #8a2f52; margin-bottom: 6px; }
.scr-area { position: relative; }
.scr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.scr-cell { aspect-ratio: 1; background: #fffdf6; border: 2px solid var(--ink); border-radius: 12px; display: grid; place-items: center; overflow: hidden; }
.scr-cell img { width: 76%; height: 76%; object-fit: contain; }
.scr-foil { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.scr-cell.hit { background: #fff3a8; animation: scrHit .5s ease 3; }
@keyframes scrHit { 50% { transform: scale(1.08); } }
.scr-ticket.big { animation: scrBig .6s ease 3; }
@keyframes scrBig { 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }
.scr-msg { min-height: 1.4em; margin: 6px 0 0; font: 0.95rem var(--display); color: var(--ink); }
.scr-msg.good { color: #2f6b2a; }
.scr-msg.big { color: #c0473f; font-size: 1.1rem; }
.scr-msg.bad { color: #c0473f; font-size: 0.85rem; }
.scr-buy { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 12px 0 6px; }
.scr-buy .btn:disabled, .scr-all:disabled { opacity: .55; }
.scr-all { width: 100%; }
.scr-table li { grid-column: 1 / -1; }
@media (prefers-reduced-motion: reduce) { .scr-cell.hit, .scr-ticket.big { animation: none; } }
/* 머리줄 버튼이 셋(복권·슬롯·대결)이 되어 360px 폰에서 8px 넘쳤음 → 버튼 안쪽 여백·간격만 줄임 */
.social-head { gap: 6px; }
.social-head .online { min-width: 0; text-align: right; }  /* 「지금 N명 · N명 시험 중」은 원래 줄바꿈되는 칸 */
.social-head .mini-btn.scr-open, .social-head .mini-btn.slot-open, .social-head .mini-btn.duel-open { padding-inline: 9px; }
/* 320px 폰은 그래도 29px 모자라 머리줄 제목만 화면에서 숨김(읽기 프로그램에는 남김) — 버튼이 둘일 때도 7px 넘쳤음 */
@media (max-width: 359px) { .social-head h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .social-head .scr-open { margin-left: 0; } }
/* 당첨 연출·대박 자랑하기(v4.37) */
.scr-ticket { position: relative; }
.scr-party { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 16px; cursor: pointer; }
.scr-brag { width: 100%; margin-top: 6px; background: linear-gradient(90deg, #ff8fa8, #f4b42a); }
/* 복권 종류 줄·할로윈 복권(v4.38) */
.scr-kinds { display: flex; gap: 6px; justify-content: center; margin: 0 0 8px; }
.scr-kinds button { font: 0.82rem var(--display); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 12px; background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap; }
.scr-kinds button[aria-pressed="true"] { background: #ffd9e4; }
.scr-kinds button.k-halloween[aria-pressed="true"] { background: #ffb36b; }
.scr-kinds button:disabled { opacity: .55; cursor: default; }
.scr-ticket.hw { background: linear-gradient(160deg, #5b3f8c, #2f2450 70%); }
.scr-ticket.hw .scr-band { color: #ffd38a; }
.scr-ticket.hw .scr-msg { color: #fff6e0; }
.scr-ticket.hw .scr-msg.big { color: #ffb36b; }
.scr-ticket.hw .scr-cell { background: #fff8ec; }
.scr-ticket.hw .scr-cell.hit { background: #ffd38a; }
.scr-ticket.hw .scr-msg.good { color: #b9f0a8; }
/* 채팅 복권 대박 줄(v4.39): 분홍 띠 + [나도 긁기] */
#chatLog li.scr-line { background: #fff0f4; border-left: 3px solid #e17a9a; }
.chatlog li .chat-watch.scr-chat { border-color: #c2577a; color: #a8355a; }
/* 폰 맨 위 복권 바로가기(v4.40): 900px 미만(같이 놀기가 들판 아래로 내려가는 폭)에서만, 첫 판 전·판 도중엔 숨김 */
.hdr-scr { display: none; }
@media (max-width: 899px) {
  .hdr-scr { display: inline-flex; align-items: center; gap: 4px; align-self: center; margin-left: auto; margin-right: -4px; font: 0.86rem var(--display); white-space: nowrap;
    border: 2px solid #c2577a; border-radius: 999px; padding: 6px 12px; background: #ffe3ec; color: #8a2f52; cursor: pointer; box-shadow: 0 3px 0 rgba(61,48,43,.18); }
  .hdr-scr img { width: 20px; height: 20px; object-fit: contain; }
}
@media (max-width: 359px) { .hdr-scr { padding: 6px 9px; } .hdr-scr img { display: none; } }
.hdr-scr[hidden], html.rookie .hdr-scr { display: none !important; }
@media (max-width: 899px) { .hdr-scr.hdr-scr-end { background: #ffb36b; border-color: #b8602a; color: #5a2a0a; } }
.hdr-scr.hdr-scr-end img { display: none; }
/* 복권 도감 줄(v4.41) */
.scr-dex { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 8px 0 0; font-size: 0.78rem; flex-wrap: wrap; }
.scr-dex b { font: 0.82rem var(--display); color: #8a2f52; margin-right: 2px; }
.scr-dex img { width: 26px; height: 26px; object-fit: contain; filter: grayscale(1) opacity(.35); }
.scr-dex img.on { filter: none; }
.scr-dex small { color: var(--muted); margin-left: 2px; }
.scr-dlg .scr-king { margin: -6px 0 10px; font: 0.8rem var(--display); color: #b8602a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-dlg .slot-king { margin: -4px 0 8px; font: 0.8rem var(--display); color: #b8602a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-dlg .slot-dex { margin: 0 0 4px; }
.scr-buy .scr-free { grid-column: 1 / -1; background: linear-gradient(90deg, #7a3fb0, #c2577a); }
.scr-duel { display: block; margin: 0 auto 10px; background: linear-gradient(90deg, #7a3fb0, #c2577a); }
/* 공짜 복권 숫자 배지·결과 카드 「+복권」(v4.47): 버튼 폭이 안 바뀌게 모서리에 띄움 */
.scr-open, .hdr-scr, .rec-pair .rec-end { position: relative; }
.scr-badge { position: absolute; top: -7px; right: -7px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: #7a3fb0; color: #fff; font: 0.68rem/17px var(--display); text-align: center; box-shadow: 0 0 0 2px #fffaf0; }
.scr-tag { position: absolute; top: -14px; right: -14px; padding: 0 5px; border-radius: 999px; background: linear-gradient(90deg, #ff8fa8, #f4b42a); color: #fff; font: 0.56rem/1.45 var(--display); white-space: nowrap; box-shadow: 0 0 0 1.5px #fffaf0; }
