/* 파파게임 회원 포털. 구성: 흰 상단바 → 어두운 메뉴줄 → 큰 배너와 게임 타일 → 안내 띠 → 프로모 배너 → 흰 카드형 본문 + 오른쪽 바로가기. */
#portal {
  --ink: #1d1d1f;
  --sub: #5f6368;
  --line: #dcdcdc;
  --page: #ececec;
  --card: #fff;
  --nav: #242424;
  --accent: #f0661a;
  --accent-ink: #fff;
  --gold: #c9a24a;
  --gold-hi: #f4dc9a;
  --night: #120d24;
  position: fixed; inset: 0; overflow-y: auto; z-index: 10;
  background: var(--page); color: var(--ink); font-size: 14px; line-height: 1.55;
  -webkit-user-select: text; user-select: text;
  scrollbar-color: #9a9a9a var(--page); caret-color: var(--accent);
}
#portal[hidden] { display: none; }
#portal ::selection { background: var(--accent); color: #fff; }
#portal :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
#portal button { font: inherit; cursor: pointer; }
.s-wrap { width: min(1100px, 100% - 32px); margin: 0 auto; }

/* 상단바 */
.s-top { background: #fff; border-bottom: 1px solid var(--line); }
.s-top .s-wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 46px; width: min(1560px, 100% - 32px); }
.s-short { justify-self: start; display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--ink); font-weight: 700; padding: 6px 4px; }
.s-short svg { width: 20px; height: 20px; }
.s-logo { justify-self: center; display: inline-flex; align-items: center; height: 40px; text-decoration: none; color: var(--accent); font-size: 22px; font-weight: 900; letter-spacing: .02em; }
.s-logo img { height: 40px; width: auto; display: block; }
.s-auth { justify-self: end; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; font-size: 13px; }
.s-auth b { font-variant-numeric: tabular-nums; color: #b4470a; }
.s-pill { height: 28px; padding: 0 14px; border-radius: 14px; border: 1px solid #1d1d1f; background: #fff; color: var(--ink); font-weight: 700; font-size: 13px; }
.s-pill:hover { background: #f3f3f3; }
.s-pill.hot { border-color: var(--accent); color: var(--accent); }

/* 메뉴줄 */
.s-nav { background: var(--nav); position: sticky; top: 0; z-index: 4; }
.s-nav .s-wrap { display: flex; align-items: stretch; width: min(1560px, 100%); min-height: 42px; }
.s-links { display: flex; flex-wrap: wrap; flex: 1; justify-content: center; padding: 0 12px; }
.s-links button { border: 0; background: none; color: #e9e9e9; font-weight: 700; padding: 0 16px; min-height: 42px; }
.s-links button:hover { color: #fff; background: #333; }
.s-start { border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 800; padding: 0 34px; min-height: 42px; }
.s-start:hover { background: #ff7b33; }

/* 큰 배너와 게임 타일 */
/* 그림(hero.webp)이 없을 때의 임시 배경: 밤하늘 위로 번지는 금빛·주황 햇살 */
.s-hero { position: relative; background: radial-gradient(46% 62% at 50% 4%, #ffd27a 0%, #f08a24 16%, rgba(194, 87, 26, .55) 34%, rgba(58, 29, 77, 0) 62%), linear-gradient(180deg, #3a1d4d 0%, #23143f 46%, var(--night) 100%); background-size: cover; background-position: center top; padding: 34px 16px 0; overflow: hidden; }
/* 배너 그림은 가로 4 : 세로 1. 화면이 넓어질수록 배너도 같이 높아져 그림 위아래가 잘리지 않게 하고(너무 높아지지 않게 화면 높이의 46%까지),
   그래도 모자라면 위쪽에 맞춰 아래쪽만 잘리게 한다 (인물 머리가 잘리지 않도록). 로고와 타일은 그 안에서 세로 가운데. */
.s-hero { display: flex; flex-direction: column; justify-content: center; min-height: min(25vw, 46vh); }
@media (min-width: 2200px) {
  .s-hero .s-tile { width: 300px; }
  .s-hero .s-hero-logo img { height: 128px; }
  .s-hero .s-tiles { gap: 36px; margin-top: 32px; }
}
.s-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 6, 20, 0) 40%, rgba(10, 6, 20, .82) 100%); pointer-events: none; }
.s-hero-logo { position: relative; text-align: center; font-size: clamp(34px, 6vw, 68px); font-weight: 900; letter-spacing: .04em; line-height: 1.1; color: #fff3cf; text-shadow: 0 3px 0 #a3530c, 0 6px 0 #5c2a06, 0 14px 30px rgba(0, 0, 0, .65); }
.s-hero-logo img { height: clamp(48px, 7vw, 96px); width: auto; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .6)); }
.s-tiles { position: relative; display: flex; justify-content: center; gap: clamp(10px, 2.4vw, 28px); margin-top: 26px; padding-bottom: 18px; flex-wrap: wrap; }
.s-tile { width: clamp(150px, 22vw, 230px); border: 0; padding: 0; background: none; color: #fff; text-align: center; transition: transform .22s cubic-bezier(.16, 1, .3, 1), filter .22s; }
.s-tile:hover { transform: translateY(-6px); filter: brightness(1.12); }
.s-tile:active { transform: translateY(-2px) scale(.985); }
.s-tile img { width: 100%; height: auto; display: block; }
.s-tile .frame { display: block; border-radius: 16px; padding: 3px; background: linear-gradient(160deg, var(--gold-hi), var(--gold) 45%, #6b4a12); box-shadow: 0 12px 26px rgba(0, 0, 0, .55); }
.s-tile .art { display: block; border-radius: 13px; aspect-ratio: 405 / 125; background-repeat: no-repeat; background-size: 252.84% auto; background-position: 2.42% 5.44%; background-color: #0e2a27; }
.s-tile .name { display: block; margin-top: 8px; font-size: 20px; font-weight: 900; text-shadow: 0 2px 4px #000; }
.s-tile .en { display: block; font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--gold-hi); }
/* 고른 게임의 타일은 떠오르고 나머지는 한 걸음 물러난다 */
.s-tiles.picked .s-tile:not(.on) { filter: saturate(.7) brightness(.66); }
.s-tiles.picked .s-tile:not(.on):hover { filter: saturate(.9) brightness(.9); }
.s-tile.on { transform: translateY(-6px) scale(1.05); }

/* 금액별 채널: 게임 타일을 누르면 배너는 그대로 두고 바로 밑에 실버 4 · 골드 4 카드가 펼쳐진다 */
.s-chband { background: linear-gradient(180deg, #171029 0%, #1e1538 100%); border-top: 2px solid #f1c453; padding: 16px 16px 18px; animation: band-in .4s cubic-bezier(.16, 1, .3, 1); }
.s-chband[hidden] { display: none; }
@keyframes band-in { from { opacity: 0; transform: translateY(-10px); } }
.s-chs { width: min(1100px, 100%); margin: 0 auto; }
@media (min-width: 2200px) { .s-chs { width: min(1320px, 100%); } }
.s-ch-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.s-ch-head h2 { margin: 0; font-size: clamp(17px, 2.2vw, 22px); font-weight: 900; color: #fff3cf; }
.s-ch-back { height: 34px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 17px; background: rgba(12, 8, 24, .6); color: #fff; font-weight: 700; font-size: 13px; transition: background-color .16s, transform .16s cubic-bezier(.16, 1, .3, 1); }
.s-ch-back:hover { background: rgba(40, 28, 70, .85); }
.s-ch-back:active { transform: scale(.96); }
.s-ch-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.s-ch { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 10px 8px 8px; border-radius: 10px; color: #fff; text-align: center; line-height: 1.3; transition: transform .2s cubic-bezier(.16, 1, .3, 1), filter .2s; animation: tile-in .5s cubic-bezier(.16, 1, .3, 1) backwards; animation-delay: calc(var(--i, 0) * 40ms); }
.s-ch.silver { border: 2px solid #b9c3e6; background: linear-gradient(180deg, #3d4676 0%, #1d2244 52%, #141832 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 8px 18px rgba(0, 0, 0, .5); }
.s-ch.gold { border: 2px solid #f1c453; background: linear-gradient(180deg, #7a5514 0%, #3d2a09 52%, #261a04 100%); box-shadow: inset 0 0 0 1px rgba(255, 240, 190, .16), 0 8px 18px rgba(0, 0, 0, .5); color: #ffe58a; }
.s-ch:hover { transform: translateY(-5px); filter: brightness(1.12); }
.s-ch:active { transform: translateY(-1px) scale(.98); }
.s-ch .top { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; }
.s-ch .top i { width: 22px; height: 22px; border-radius: 50%; flex: none; background: radial-gradient(circle at 34% 30%, #fff 0%, #cfd6e4 38%, #7d869c 100%); box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 1px 3px rgba(0, 0, 0, .5); }
.s-ch.gold .top i { background: radial-gradient(circle at 34% 30%, #fff8cf 0%, #ffc93a 40%, #c97a08 100%); }
.s-ch strong { margin-top: 4px; font-size: 19px; font-weight: 900; text-shadow: 0 2px 3px rgba(0, 0, 0, .7); white-space: nowrap; }
.s-ch .min { font-size: 13px; font-weight: 700; white-space: nowrap; }
.s-ch .seed { width: 100%; margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(255, 255, 255, .4); font-size: 11px; color: #d6dcf2; white-space: nowrap; }
.s-ch.gold .seed { color: #f1dba0; border-top-color: rgba(241, 196, 83, .55); }
.s-ch .go { width: 100%; margin-top: 6px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 6px; font-size: 13px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); background: linear-gradient(180deg, #5db8ea, #2c7db6); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.s-ch.gold .go { background: linear-gradient(180deg, #f8bb3e, #dc7616); }
.s-ch.lock { filter: grayscale(.55) brightness(.72); }
.s-ch.lock:hover { transform: none; filter: grayscale(.4) brightness(.8); }
.s-ch.lock .go { background: #4a4f5e; font-size: 12px; }
.s-ch-note { min-height: 20px; margin: 10px 0 0; text-align: center; color: #ffd98a; font-size: 13px; font-weight: 700; text-shadow: 0 1px 3px #000; }
@media (max-width: 1000px) {
  .s-ch-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
}
@media (max-width: 560px) {
  .s-chband { padding: 12px 10px 14px; }
  .s-ch-head h2 { font-size: 16px; }
  .s-ch-grid { gap: 6px; }
  .s-ch { padding: 8px 4px 6px; }
  .s-ch .top { font-size: 12px; gap: 4px; }
  .s-ch .top i { width: 16px; height: 16px; }
  .s-ch strong { font-size: 15px; }
  .s-ch .min { font-size: 12px; }
  .s-ch .seed { font-size: 10px; }
  .s-ch .go { height: 28px; font-size: 12px; }
  .s-ch.lock .go { font-size: 10px; }
}

/* 안내 띠 · 프로모 배너 (금색 테두리) */
.s-strip, .s-promo { border-radius: 10px; padding: 3px; background: linear-gradient(160deg, var(--gold-hi), var(--gold) 40%, #6b4a12 100%); box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.s-strip { margin-top: 18px; }
.s-strip > div { display: flex; align-items: center; gap: 14px; border-radius: 8px; background: #17142b; color: #fff; padding: 6px 6px 6px 10px; min-height: 44px; }
.s-badge { flex: none; padding: 4px 14px; border-radius: 6px; background: linear-gradient(#f4dc9a, #c9a24a); color: #2c1c00; font-weight: 900; }
.s-marq { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; }
.s-marq span { display: inline-block; padding-left: 100%; animation: marq 22s linear infinite; }
@keyframes marq { to { transform: translateX(-100%); } }
.s-cta { flex: none; height: 34px; padding: 0 22px; border: 0; border-radius: 6px; background: var(--accent); color: #fff; font-weight: 800; }
.s-cta:hover { background: #ff7b33; }
.s-promo { margin-top: 18px; }
/* 글자는 왼쪽에 모은다: 그림의 가운데~오른쪽에는 캐릭터와 카드가 놓인다 */
.s-promo > div { position: relative; border-radius: 8px; min-height: clamp(180px, 30vw, 330px); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; text-align: left; color: #f6ead0; padding: 44px clamp(20px, 6vw, 72px) 28px; background: radial-gradient(80% 120% at 30% 40%, #2a2140 0%, #0d0a18 75%); background-size: cover; background-position: center; overflow: hidden; }
.s-promo > div > * { max-width: min(46%, 440px); }
/* 휴대폰: 글자는 왼쪽 절반 안에만 두고, 그림은 인물이 오른쪽에 오도록 옮긴다 */
@media (max-width: 560px) {
  .s-promo > div { background-position: 44% center; padding-left: 18px; }
  .s-promo > div > * { max-width: 48%; }
  .s-promo > div > .tag, .s-promo > div > .go { max-width: none; }
  .s-promo > div > h2 { font-size: 19px; letter-spacing: .02em; word-break: keep-all; }
  .s-promo > div > p { word-break: keep-all; }
  .s-promo > div > .go { padding: 0 24px; height: 42px; font-size: 16px; white-space: nowrap; }
}
.s-promo .tag { position: absolute; left: 16px; top: 14px; padding: 2px 12px; border: 1px solid var(--gold); border-radius: 12px; font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--gold-hi); }
.s-promo h2 { margin: 0; font-size: clamp(20px, 3.4vw, 34px); font-weight: 800; letter-spacing: .08em; color: var(--gold-hi); text-wrap: balance; }
.s-promo p { margin: 0; font-size: clamp(13px, 1.6vw, 17px); }
.s-promo .go { margin-top: 8px; height: 46px; padding: 0 44px; border-radius: 23px; border: 1px solid var(--gold); background: rgba(20, 14, 6, .7); color: var(--gold-hi); font-size: 18px; font-weight: 800; letter-spacing: .1em; }
.s-promo .go:hover { background: rgba(60, 42, 12, .85); }

/* 본문 */
.s-body { padding: 22px 0 46px; }
.s-cols { display: grid; grid-template-columns: minmax(0, 1fr) 108px; gap: 22px; align-items: start; }
.s-card { background: var(--card); border: 1px solid var(--line); border-radius: 4px; }
.s-card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.s-card h2 { margin: 0; font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.s-card h2::before { content: ""; width: 3px; height: 13px; background: var(--accent); border-radius: 2px; }
.s-more { border: 0; background: none; color: var(--sub); font-size: 12px; }
.s-more:hover { color: var(--ink); }
.s-card .pad { padding: 14px 16px; }
.s-tabs { display: flex; gap: 4px; }
.s-tabs button { border: 1px solid var(--line); background: #fff; border-radius: 4px; padding: 3px 10px; font-size: 12px; color: var(--sub); }
.s-tabs button.on { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.s-rank { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.s-rank li { list-style: none; border: 1px solid var(--line); border-radius: 4px; padding: 12px 8px; text-align: center; }
.s-rank .no { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: #2b2b2b; color: var(--gold-hi); font-weight: 900; font-size: 17px; }
.s-rank li:first-child .no { background: linear-gradient(#f4dc9a, #c9a24a); color: #2c1c00; }
.s-rank .who { display: block; margin-top: 8px; font-weight: 700; }
.s-rank .net { display: block; color: #c0392b; font-weight: 700; font-variant-numeric: tabular-nums; }
.s-row3 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr) 220px; gap: 16px; margin-top: 16px; align-items: stretch; }
.s-list { margin: 0; padding: 6px 16px 10px; list-style: none; }
.s-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13px; }
.s-list button { border: 0; background: none; padding: 0; color: var(--ink); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-list button:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.s-list time, .s-list .st { flex: none; color: var(--sub); font-size: 12px; font-variant-numeric: tabular-nums; }
.s-list .st.done { color: #0d6b2c; font-weight: 700; }
.s-empty { margin: 0; padding: 34px 16px; text-align: center; color: var(--sub); font-size: 13px; }
.s-ask { border-radius: 4px; border: 0; padding: 18px 14px; background: linear-gradient(160deg, #f6c7b9, #e58c80); color: #4a1210; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 10px; text-align: center; min-height: 240px; }
.s-ask strong { font-size: 21px; font-weight: 900; line-height: 1.25; text-wrap: balance; }
.s-ask img, .s-ask svg { width: 120px; height: auto; }
.s-ask span.go { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 6px; background: #1f3c88; color: #fff; font-weight: 700; font-size: 13px; white-space: nowrap; }
.s-quick { background: #fff; border: 1px solid var(--line); border-radius: 4px; display: grid; }
.s-quick button { border: 0; border-bottom: 1px solid var(--line); background: none; padding: 14px 6px 10px; display: grid; justify-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--ink); }
.s-quick button:last-child { border-bottom: 0; }
.s-quick button:hover { background: #f6f6f6; color: var(--accent); }
.s-quick svg { width: 30px; height: 30px; }
.s-foot { background: #2b2b2b; color: #bdbdbd; font-size: 12px; padding: 20px 0 30px; }
.s-foot p { margin: 0; max-width: 75ch; }

/* ── 움직임 ── */
/* 첫 화면: 로고가 내려앉고 게임 타일이 차례로 올라온다 */
.s-hero-logo { animation: logo-in .9s cubic-bezier(.16, 1, .3, 1) backwards; }
@keyframes logo-in { from { opacity: 0; transform: translateY(-18px) scale(1.06); filter: blur(8px); } }
.s-tile { animation: tile-in .7s cubic-bezier(.16, 1, .3, 1) backwards; animation-delay: calc(.2s + var(--i, 0) * .09s); }
@keyframes tile-in { from { opacity: 0; transform: translateY(34px) scale(.94); } }
/* 스크롤해 내려오면 한 번 떠오른다 */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--i, 0) * 80ms); }
.rv.in { opacity: 1; transform: none; }
/* 공지 띠는 왼쪽에서 오른쪽으로 펼쳐진다 */
.s-strip.rv { opacity: 1; transform: none; clip-path: inset(0 100% 0 0 round 10px); transition: clip-path .9s cubic-bezier(.16, 1, .3, 1); }
.s-strip.rv.in { clip-path: inset(0 0 0 0 round 10px); }
.s-rank li { animation: tile-in .5s cubic-bezier(.16, 1, .3, 1) backwards; animation-delay: calc(var(--i, 0) * 50ms); }
.s-pill, .s-cta, .s-start, .s-promo .go, .s-quick button, .s-links button, .s-tabs button { transition: background-color .16s, color .16s, border-color .16s, transform .16s cubic-bezier(.16, 1, .3, 1); }
.s-pill:active, .s-cta:active, .s-start:active, .s-promo .go:active { transform: scale(.96); }
.s-quick button svg { transition: transform .25s cubic-bezier(.16, 1, .3, 1); }
.s-quick button:hover svg { transform: translateY(-3px); }
.s-card { transition: box-shadow .25s, transform .25s cubic-bezier(.16, 1, .3, 1); }
.s-ask { transition: transform .25s cubic-bezier(.16, 1, .3, 1), box-shadow .25s; }
.s-ask:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(74, 18, 16, .22); }
/* 창이 열리고 닫힐 때 */
dialog.s-dlg[open] { animation: dlg-in .36s cubic-bezier(.16, 1, .3, 1); }
dialog.s-dlg[open]::backdrop { animation: back-in .3s ease-out; }
dialog.s-dlg.closing { animation: dlg-out .15s ease-in forwards; }
dialog.s-dlg.closing::backdrop { opacity: 0; transition: opacity .15s; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(20px) scale(.96); filter: blur(4px); } }
@keyframes dlg-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes back-in { from { opacity: 0; } }

/* 창 */
dialog.s-dlg { border: 0; border-radius: 8px; padding: 0; width: min(460px, calc(100vw - 28px)); max-height: calc(100vh - 40px); color: #1d1d1f; background: #fff; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); font: 14px/1.55 "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; -webkit-user-select: text; user-select: text; }
dialog.s-dlg.wide { width: min(640px, calc(100vw - 28px)); }
dialog.s-dlg::backdrop { background: rgba(0, 0, 0, .55); }
.s-dlg > header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #dcdcdc; font-weight: 800; }
.s-dlg > header button { border: 0; background: none; font-size: 22px; line-height: 1; padding: 2px 8px; cursor: pointer; color: #5f6368; }
.s-dlg .body { padding: 16px; overflow-y: auto; max-height: calc(100vh - 150px); }
.s-dlg label { display: block; font-size: 12px; font-weight: 700; color: #5f6368; margin: 10px 0 4px; }
.s-dlg input, .s-dlg textarea { width: 100%; padding: 0 12px; height: 40px; border: 1px solid #cfcfcf; border-radius: 6px; font: inherit; color: #1d1d1f; background: #fff; }
.s-dlg textarea { height: 130px; padding: 10px 12px; resize: vertical; }
.s-dlg input:focus-visible, .s-dlg textarea:focus-visible, .s-dlg button:focus-visible { outline: 2px solid #f0661a; outline-offset: 1px; }
.s-dlg .main { width: 100%; height: 42px; margin-top: 14px; border: 0; border-radius: 6px; background: #f0661a; color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.s-dlg .main:disabled { background: #b9b9b9; cursor: default; }
.s-dlg .err { min-height: 20px; margin-top: 8px; color: #b3261e; font-weight: 700; font-size: 13px; }
.s-dlg .note { color: #5f6368; font-size: 12px; margin: 10px 0 0; }
.s-dlg .err.ok { color: #0d6b2c; }
/* 토너먼트 */
.s-tourbar { background: #2a1a05; border-bottom: 1px solid #c9a24a; color: #ffe7a8; font-size: 13px; font-weight: 700; }
.s-tourbar[hidden] { display: none; }
.s-tourbar .s-wrap { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 8px 0; }
.s-tourbar button { height: 30px; padding: 0 14px; border: 0; border-radius: 15px; background: linear-gradient(180deg, #ffb24d, #f0661a); color: #fff; font-weight: 800; font-size: 13px; }
.tr-body .err { min-height: 0; margin: 0 0 8px; }
.tr-list { display: grid; gap: 10px; }
.tr-empty { padding: 28px 0; text-align: center; color: #5f6368; }
.tr-card { border: 1px solid #dcdcdc; border-radius: 10px; padding: 12px 14px; background: #fff; }
.tr-card.mine { border-color: #f0661a; box-shadow: 0 0 0 2px rgba(240, 102, 26, .18); }
.tr-card.done, .tr-card.canceled { background: #fafafa; }
.tr-card header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tr-card header strong { font-size: 16px; }
.tr-game { font-size: 12px; color: #5f6368; }
.tr-tag { padding: 2px 9px; border-radius: 10px; font-size: 11px; font-weight: 800; background: #ececec; color: #3c4043; }
.tr-tag.open { background: #fff1cf; color: #8a5a00; }
.tr-tag.running { background: #d8f0de; color: #0d6b2c; }
.tr-tag.canceled { background: #fbe1df; color: #b3261e; }
.tr-when { margin-top: 4px; font-size: 13px; font-weight: 700; color: #b4470a; }
.tr-card.done .tr-when, .tr-card.canceled .tr-when { color: #5f6368; font-weight: 400; }
.tr-card dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 8px 0 0; font-size: 13px; }
.tr-card dt { color: #5f6368; }
.tr-card dd { margin: 0; font-variant-numeric: tabular-nums; }
.s-dlg .tr-card footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 10px -14px -12px; padding: 8px 14px; border-top: 1px solid #ececec; border-radius: 0 0 10px 10px; background: #faf8f4; }
.tr-card footer button { height: 32px; padding: 0 14px; border-radius: 6px; border: 1px solid #cfcfcf; background: #fff; font-size: 13px; font-weight: 700; }
.tr-card footer button.go { border: 0; background: #f0661a; color: #fff; }
.tr-card footer button:disabled { background: #e6e6e9; color: #6b6f76; border-color: transparent; cursor: default; }
.tr-mine { margin-right: auto; color: #b4470a; font-weight: 800; font-size: 13px; }
/* 아바타 상점 */
.av-top { display: flex; align-items: baseline; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid #ececec; }
.av-top b { font-size: 18px; color: #b4470a; font-variant-numeric: tabular-nums; }
.av-body .err { margin-top: 8px; }
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin-top: 4px; }
.av-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px 10px; border: 1px solid #dcdcdc; border-radius: 10px; background: #fff; text-align: center; transition: border-color .16s, box-shadow .16s, transform .2s cubic-bezier(.16, 1, .3, 1); }
.av-card:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0, 0, 0, .1); }
.av-card.on { border-color: #f0661a; box-shadow: 0 0 0 2px rgba(240, 102, 26, .25); }
.av-pic { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #1d1436; box-shadow: 0 0 0 2px #c9a24a; flex: none; }
.av-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-pic i { display: block; transform: scale(1.5); image-rendering: pixelated; }
.av-pic.none { color: #f4dc9a; font-weight: 800; font-size: 20px; background: linear-gradient(160deg, #3a1d4d, #1d1436); }
.av-card strong { font-size: 13px; margin-top: 4px; }
.av-card .price { font-size: 12px; color: #5f6368; font-variant-numeric: tabular-nums; }
.av-card button { width: 100%; height: 32px; margin-top: 4px; border-radius: 6px; border: 0; font-size: 13px; font-weight: 800; color: #fff; background: #f0661a; transition: filter .15s, transform .12s; }
.av-card button:hover { filter: brightness(1.08); }
.av-card button:active { transform: scale(.97); }
.av-card button.use { background: #3c4a66; }
.av-card button.using, .av-card button:disabled { background: #e6e6e9; color: #6b6f76; cursor: default; filter: none; transform: none; }
.s-dlg input.cp-code { height: 48px; font: 700 18px/1 Consolas, "Courier New", monospace; letter-spacing: .12em; text-align: center; text-transform: uppercase; }
.s-dlg input.cp-code::placeholder { font-weight: 400; color: #b0b0b0; }
.s-dlg .money { font-size: 28px; font-weight: 900; color: #b4470a; font-variant-numeric: tabular-nums; }
.s-dlg h3 { margin: 18px 0 6px; font-size: 14px; }
.s-dlg .rows { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.s-dlg .rows li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid #ececec; font-variant-numeric: tabular-nums; }
.s-dlg .up { color: #0d6b2c; font-weight: 700; }
.s-dlg .down { color: #b3261e; font-weight: 700; }
.s-dlg .text { white-space: pre-wrap; margin: 0; max-width: 68ch; }
.s-dlg .answer { margin-top: 14px; padding: 12px; background: #f5f5f5; border-radius: 6px; white-space: pre-wrap; }
.s-dlg footer { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-top: 1px solid #dcdcdc; background: #faf6ef; }
.s-dlg footer button { border: 1px solid #cfcfcf; background: #fff; border-radius: 4px; padding: 6px 14px; font: inherit; font-size: 12px; cursor: pointer; }
.s-dlg details { border-top: 1px solid #ececec; }
.s-dlg summary { padding: 10px 2px; font-weight: 700; cursor: pointer; }
.s-dlg details ul { margin: 0 0 12px; padding-left: 20px; color: #3c4043; }

/* 로그인 창: 왼쪽 배너 그림 + 오른쪽 입력칸 */
dialog.s-dlg.login { width: min(800px, calc(100vw - 28px)); border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(201, 162, 74, .7); }
dialog.s-dlg.login[open] { display: grid; grid-template-columns: 320px minmax(0, 1fr); }
.l-art { position: relative; min-height: 420px; overflow: hidden; background: #120d24; color: #fff; }
.l-pic { position: absolute; inset: 0; background: var(--art, radial-gradient(70% 60% at 50% 12%, #ffd27a 0%, #f08a24 20%, #3a1d4d 60%, #120d24 100%)) 22% center / cover no-repeat; animation: art-in 1.6s cubic-bezier(.16, 1, .3, 1) backwards; }
@keyframes art-in { from { transform: scale(1.14); filter: blur(6px); } }
.l-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18, 13, 36, .05) 30%, rgba(18, 13, 36, .9) 82%); }
.l-cap { position: absolute; left: 24px; right: 24px; bottom: 26px; z-index: 1; display: grid; gap: 6px; animation: cap-in .8s cubic-bezier(.16, 1, .3, 1) .25s backwards; }
@keyframes cap-in { from { opacity: 0; transform: translateY(14px); } }
.l-cap img { width: 170px; height: auto; }
.l-word { font-size: 30px; font-weight: 900; letter-spacing: .04em; color: #fff3cf; }
.l-cap strong { font-size: 19px; font-weight: 800; color: #f4dc9a; letter-spacing: .04em; }
.l-cap span { font-size: 13px; color: #e2d8ee; }
.l-form { position: relative; padding: 40px 36px 30px; }
.l-form .x { position: absolute; right: 14px; top: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; font-size: 24px; line-height: 1; color: #5f6368; cursor: pointer; transition: background-color .15s, transform .2s cubic-bezier(.16, 1, .3, 1); }
.l-form .x:hover { background: #f1f1f2; transform: rotate(90deg); }
.l-form h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
.l-sub { margin: 4px 0 18px; color: #5f6368; }
.l-form form > * { animation: cap-in .5s cubic-bezier(.16, 1, .3, 1) backwards; }
.l-form form > :nth-child(1), .l-form form > :nth-child(2) { animation-delay: .1s; }
.l-form form > :nth-child(3), .l-form form > :nth-child(4) { animation-delay: .16s; }
.l-form form > :nth-child(5) { animation-delay: .22s; }
.s-dlg.login label { font-size: 13px; margin: 14px 0 6px; color: #3c4043; }
.s-dlg.login input { height: 48px; border-radius: 10px; border: 1px solid transparent; background: #f3f3f5; font-size: 15px; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.s-dlg.login input:hover { background: #ededf0; }
.s-dlg.login input:focus-visible { outline: 0; border-color: #f0661a; background: #fff; box-shadow: 0 0 0 4px rgba(240, 102, 26, .16); }
.l-pw { position: relative; }
.l-pw input { padding-right: 64px; }
.l-pw button { position: absolute; right: 6px; top: 6px; height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: #5f6368; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.l-pw button:hover { background: #e6e6ea; color: #1d1d1f; }
.s-dlg.login .main { height: 50px; margin-top: 22px; border-radius: 10px; font-size: 16px; letter-spacing: .04em; background: linear-gradient(180deg, #ff8a3a, #f0661a 60%, #dc5510); box-shadow: 0 8px 18px rgba(240, 102, 26, .32); transition: transform .16s cubic-bezier(.16, 1, .3, 1), box-shadow .16s, filter .16s; }
.s-dlg.login .main:hover { transform: translateY(-1px); box-shadow: 0 12px 22px rgba(240, 102, 26, .38); filter: brightness(1.04); }
.s-dlg.login .main:active { transform: translateY(1px) scale(.99); box-shadow: 0 4px 10px rgba(240, 102, 26, .3); }
.s-dlg.login .main:disabled { background: #b9b9b9; box-shadow: none; transform: none; }
.s-dlg.login .note { margin-top: 18px; padding-top: 14px; border-top: 1px solid #ececec; }
.s-dlg form.shake { animation: shake .36s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
@media (max-width: 640px) {
  dialog.s-dlg.login[open] { grid-template-columns: minmax(0, 1fr); }
  .l-art { min-height: 132px; }
  .l-cap { bottom: 14px; }
  .l-cap img { width: 130px; }
  .l-cap span { display: none; }
  .l-form { padding: 26px 20px 22px; }
}

@media (max-width: 900px) {
  .s-cols { grid-template-columns: minmax(0, 1fr); }
  .s-quick { grid-template-columns: repeat(4, 1fr); }
  .s-quick button { border-bottom: 0; border-right: 1px solid var(--line); }
  .s-row3 { grid-template-columns: minmax(0, 1fr); }
  .s-ask { min-height: 0; flex-direction: row; flex-wrap: wrap; text-align: left; }
  .s-ask img, .s-ask svg { width: 72px; }
  .s-start { padding: 0 18px; }
  .s-links { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .s-links::-webkit-scrollbar { display: none; }
  .s-links button { white-space: nowrap; padding: 0 12px; }
}
@media (max-width: 560px) {
  .s-top .s-wrap { grid-template-columns: auto 1fr auto; gap: 8px; }
  .s-short span { display: none; }
  .s-auth .nick { display: none; }
  .s-quick { grid-template-columns: repeat(3, 1fr); }
  .s-tile { width: 30%; min-width: 96px; }
  .s-tile .name { font-size: 15px; }
  .s-strip > div { flex-wrap: wrap; }
  .s-marq { order: 3; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .s-marq span { animation: none; padding-left: 0; }
  #portal *, #portal *::before, #portal *::after, dialog.s-dlg, dialog.s-dlg *, dialog.s-dlg::backdrop { animation: none !important; transition: none !important; }
  .rv, .s-strip.rv { opacity: 1; transform: none; clip-path: none; }
}

/* PAPA_PORTAL_CODEX_RESPONSIVE_RED_BEGIN */
/* Mobile composition for the approved Korean red-dress banner artwork. */
@media (max-width: 560px) {
  .s-hero { background-position: left center; }
  .s-hero-logo { text-align: right; padding-left: 42%; }
  .s-hero-logo img { width: 180px; max-width: 100%; height: auto; }
  /* 프로모 배너의 휴대폰 배치는 위쪽 .s-promo 구간(그림 위치 44%, 글자 폭 48%)에서 한 곳으로 정한다. */
}

/* PAPA_PORTAL_CODEX_RESPONSIVE_RED_END */
