/* Gamepio 포털 (홈 · 계정). 토큰·알약·카드는 /common/nin.css */
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--ui); color: #fff; line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
a { color: inherit; }

/* 머리말 */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; max-width: 1100px; width: 100%; margin: 0 auto; }
.brand {
  font-family: var(--logo); font-weight: 700; font-size: 40px; line-height: 1.1; letter-spacing: 1px; color: #fff; text-decoration: none;
  -webkit-text-stroke: 7px var(--red); paint-order: stroke fill; text-shadow: 0 5px 0 var(--red-d), 0 10px 14px #00305a44;
  transform: rotate(-3deg); display: inline-block;
}
.nav { display: flex; gap: 10px; align-items: center; min-width: 0; }
.nav .pill { margin: 0; }
.account-btn { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-btn.on { --bg: var(--yellow); --sh: var(--yellow-d); }

main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 8px 20px 30px; }

/* 홈 */
.hero { text-align: center; margin: 18px 0 30px; }
.hero h1 { font-family: var(--ui); font-weight: normal; font-size: 40px; line-height: 1.3; margin: 0 0 6px; text-shadow: 0 3px 0 #0d5aa8; }
.hero p { font-size: 20px; margin: 0; opacity: .95; text-shadow: 0 2px 0 #0d5aa8; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.game {
  display: flex; flex-direction: column; padding: 0; overflow: hidden; text-decoration: none; color: var(--ink);
  border: 5px solid #fff; transition: transform .1s, box-shadow .1s;
}
a.game:hover { transform: translateY(-4px) rotate(-.6deg); box-shadow: 0 12px 0 #0b4f9a40, 0 24px 34px #00306040; }
a.game:active { transform: translateY(4px); }
.g-art {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; height: 170px;
  background: radial-gradient(circle, #ffffff30 18%, transparent 19%) 0 0 / 30px 30px, linear-gradient(160deg, var(--c1), var(--c2));
}
.g-icon { font-size: 64px; line-height: 1; filter: drop-shadow(0 4px 0 #00000030); }
.g-logo {
  font-family: var(--logo); font-weight: 700; font-size: 52px; line-height: 1; color: #fff; transform: rotate(-4deg);
  -webkit-text-stroke: 9px var(--ink); paint-order: stroke fill; text-shadow: 0 6px 0 #00000040;
}
.g-body { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 18px 18px; text-align: center; }
.g-tagline { font-size: 18px; line-height: 1.5; }
.g-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.g-tag { font-size: 14px; background: #eef1f6; border-radius: 999px; padding: 2px 12px; color: #4b5260; }
.g-play { margin: 4px 0 2px; }
.g-status {
  position: absolute; top: 12px; right: 12px; font-size: 16px; background: var(--yellow); color: var(--ink);
  border: 3px solid #fff; border-radius: 999px; padding: 2px 12px; box-shadow: 0 3px 0 #00000030;
}
.game.off .g-art > :not(.g-status), .game.off .g-tagline, .game.off .g-tags { filter: grayscale(.85); opacity: .6; }
.game.off .g-play { --bg: #9aa3b2; --sh: #6b7280; }
.game.soon {
  align-items: center; justify-content: center; gap: 6px; min-height: 300px; padding: 24px; color: #fff; text-align: center;
  border: 5px dashed #ffffffa0; border-radius: 28px; background: #ffffff1c;
}
.soon-title { font-size: 24px; }
.soon-sub { font-size: 16px; opacity: .9; }

/* 게임 일시 중지·점검 안내 (status.html) */
.status-page { display: flex; justify-content: center; align-items: flex-start; padding-top: 30px; }
.st-card { width: 100%; max-width: 480px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.st-game { font-family: var(--logo); font-weight: 700; font-size: 28px; }
.st-msg { color: var(--ink); background: #fff4d6; border-radius: 16px; padding: 8px 14px; }

/* 계정 */
.acct { max-width: 520px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.acct > .link { align-self: flex-start; margin-top: 0; }
.acct > .link.go { --pulse: #ffd23f; background: var(--yellow); color: var(--ink); border-color: #fff; animation: nudge 1s ease-in-out 3; }
@keyframes nudge { 50% { transform: translateY(-4px); } }
.page-title {
  font-family: var(--logo); font-weight: 700; font-size: 40px; margin: -6px 0 0; color: #fff; line-height: 1.2;
  -webkit-text-stroke: 7px var(--blue-d); paint-order: stroke fill; text-shadow: 0 5px 0 #0a5f80;
}
.acct .card { width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; }
.acct form { width: 100%; display: flex; flex-direction: column; align-items: center; }
.row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.row .pill { min-width: 130px; }
#st-member, #st-guest { width: 100%; }
#st-email { word-break: break-all; }
.badges { margin: -6px 0 8px; }
.badge { display: inline-block; font-size: 15px; border-radius: 999px; padding: 2px 12px; }
.badge.ok { background: #e3f7e5; color: var(--green-d); }
.badge.warn { background: #fff4d6; color: #8a6400; }
.field { width: 100%; display: flex; flex-direction: column; align-items: stretch; text-align: left; }
.field > span { font-size: 15px; color: var(--sub); margin: 0 0 2px 8px; }
.text-btn { font: inherit; font-size: 15px; background: none; border: 0; color: var(--blue-d); text-decoration: underline; cursor: pointer; margin-top: 6px; }
.note { font-size: 14px; color: var(--sub); margin: 6px 0 0; line-height: 1.5; }
#profile .pill.big { margin-top: 4px; }

/* 꼬리말 */
.foot { text-align: center; font-size: 14px; color: #ffffffd0; padding: 18px 16px 22px; line-height: 1.8; }
.foot a { color: #fff; }
.foot-co { opacity: .85; }

@media (max-width: 640px) {
  .top { padding: 10px 12px; }
  .brand { font-size: 28px; -webkit-text-stroke-width: 5px; }
  .nav { gap: 6px; }
  .nav .pill.small { font-size: 13px; padding: 7px 11px; }
  .account-btn { max-width: 130px; }
  main { padding: 4px 14px 24px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 16px; }
  .games { grid-template-columns: 1fr; gap: 18px; }
  .g-art { height: 140px; }
  .g-logo { font-size: 42px; }
  .page-title { font-size: 32px; }
}
#status-msg:empty, #signin-msg:empty { display: none; }

/* 어드민 (/admin/) */
.adm { max-width: 1000px; display: flex; flex-direction: column; gap: 18px; }
.adm .page-title { align-self: center; }
.adm .narrow { width: 100%; max-width: 520px; align-self: center; display: flex; flex-direction: column; align-items: center; text-align: center; }
.adm form { width: 100%; display: flex; flex-direction: column; align-items: center; }
.adm form.form-row { flex-direction: row; align-items: flex-start; gap: 10px; }
.form-row .nin-input { flex: 1; min-width: 0; margin: 6px 0 0; font-size: 18px; padding: 8px 14px; }
#panel { display: flex; flex-direction: column; gap: 18px; }
#panel.hidden { display: none; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tabs .pill { margin: 0; }
.tabs .pill.on { --bg: var(--yellow); --sh: var(--yellow-d); }
#view { display: flex; flex-direction: column; gap: 18px; }
#view .card { width: 100%; }
#view .card-title { margin-bottom: 10px; }
#view .field .nin-input { font-size: 18px; padding: 8px 14px; margin-bottom: 8px; }
#view h3 { font-weight: normal; font-size: 19px; margin: 16px 0 4px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.tile { background: #eef1f6; border-radius: 16px; padding: 8px 10px; text-align: center; line-height: 1.3; }
.tile b { display: block; font-size: 26px; font-weight: normal; }
.tile span { font-size: 14px; color: var(--sub); }
.tbl-wrap { width: 100%; overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th, .tbl td { padding: 4px 8px; border-bottom: 1px solid #e3e8ef; text-align: left; white-space: nowrap; }
.tbl th { color: var(--sub); font-weight: normal; }
.tbl code { font-size: 13px; color: var(--sub); }
.tbl .pill.small, .kv + .pill.small { font-size: 14px; padding: 4px 12px; margin: 2px 4px 2px 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 2px 14px; margin: 0 0 8px; font-size: 15px; }
.kv dt { color: var(--sub); }
.kv dd { margin: 0; word-break: break-all; }
.toast {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 30; max-width: calc(100% - 32px);
  background: var(--red); color: #fff; border: 3px solid #fff; border-radius: 999px; padding: 6px 18px; box-shadow: 0 4px 0 #00000030;
}
.toast.ok { background: var(--blue-d); }
#login-msg:empty { display: none; }
