/* Gamepio 공용 닌텐도풍 UI (SHOOT! style.css 의 메뉴 토큰·알약·카드·입력칸을 옮겨 온 것).
   포털이 쓴다. SHOOT! 는 아직 자기 style.css 를 쓰고 3단계에서 이 파일로 옮긴다 — 값을 바꾸면 양쪽을 맞춘다. */
* { box-sizing: border-box; }
:root {
  --ui: "Fredoka", "Jua", sans-serif;
  --font: var(--ui);
  --logo: "Fredoka", var(--ui);
  --ink: #23262e;
  --sub: #6b7280;
  --red: #ff3c28; --red-d: #c41f0e;
  --blue: #0ab9e6; --blue-d: #0782a3;
  --yellow: #ffd23f; --yellow-d: #d9a400;
  --green: #3fbf4a; --green-d: #2a8f33;
  --sky1: #5fd3ff; --sky2: #2a86f0;
  --card-sh: 0 4px 0 #0b4f9a40, 0 10px 18px #00306030;
}
html:lang(ko) { --ui: "Jua", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
html:lang(ja) { --ui: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", sans-serif; }
html:lang(zh-TW) { --ui: "Noto Sans TC", "PingFang TC", sans-serif; }
html:lang(ru) { --ui: "Nunito", "Fredoka", sans-serif; }
html:lang(en), html:lang(fr), html:lang(es), html:lang(es-MX), html:lang(it), html:lang(de) { --ui: "Fredoka", "Jua", sans-serif; }

/* 하늘색 물방울 배경 */
.nin-bg {
  background:
    radial-gradient(circle, #ffffff2e 18%, transparent 19%) 0 0 / 46px 46px,
    radial-gradient(circle, #ffffff1a 18%, transparent 19%) 23px 23px / 46px 46px,
    linear-gradient(170deg, var(--sky1), var(--sky2));
  min-height: 100vh;
}

/* 흰 카드 */
.card {
  background: #fff; color: var(--ink); border-radius: 28px; padding: 20px;
  box-shadow: 0 8px 0 #0b4f9a40, 0 18px 30px #00306030;
}
.card-title { font-size: 24px; margin: 0 0 14px; font-weight: normal; }
.desc { font-size: 16px; margin: 0 0 14px; color: #555b66; }

.nin-input {
  font: inherit; font-size: 20px; color: var(--ink); background: #f2f5fa; text-align: center;
  border: 3px solid #d9e0ea; border-radius: 18px; outline: none; width: 100%; padding: 11px 16px; margin-bottom: 12px;
}
.nin-input:focus { border-color: var(--blue); background: #fff; }
select.nin-input {
  appearance: none; -webkit-appearance: none; cursor: pointer; text-align-last: center; padding-right: 40px;
  background: #f2f5fa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='M2 2l6 6 6-6' fill='none' stroke='%2323262e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center / 16px 10px;
}
select.nin-input:focus { background-color: #fff; }

/* 알약 버튼: 아래 그림자가 눌리면서 들어간다 */
.pill {
  font: inherit; font-size: 20px; color: #fff; cursor: pointer; border: 0; border-radius: 999px; text-decoration: none; display: inline-block;
  padding: 12px 28px; margin: 6px 0; background: var(--bg, var(--red)); box-shadow: 0 6px 0 var(--sh, var(--red-d)); line-height: 1.4;
  transition: transform .08s, box-shadow .08s, filter .12s;
}
.pill:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 8px 0 var(--sh, var(--red-d)); }
.pill:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--sh, var(--red-d)); }
.pill:disabled { filter: grayscale(1) opacity(.6); cursor: default; transform: none; }
.pill.big { font-size: 24px; padding: 13px 0; width: 100%; max-width: 340px; }
.pill.small { font-size: 16px; padding: 8px 18px; }
.pill.red { --bg: var(--red); --sh: var(--red-d); }
.pill.blue { --bg: var(--blue); --sh: var(--blue-d); }
.pill.yellow { --bg: var(--yellow); --sh: var(--yellow-d); color: var(--ink); }
.pill.white { --bg: #fff; --sh: #b9c6d8; color: var(--ink); }

/* 뒤로/취소/닫기: 파란 바탕에선 반투명 흰 알약, 흰 카드/모달 안에선 회색 알약 */
.link {
  font: inherit; font-size: 19px; line-height: 1.4; cursor: pointer; border: 3px solid #ffffff90; text-decoration: none; display: inline-block;
  border-radius: 999px; padding: 9px 26px; margin-top: 12px;
  color: #fff; background: #ffffff28; box-shadow: 0 5px 0 #0b4f9a40;
  transition: transform .08s, box-shadow .08s, background .12s;
}
.link:hover { background: #ffffff45; transform: translateY(-2px); box-shadow: 0 7px 0 #0b4f9a40; }
.link:active { transform: translateY(4px); box-shadow: 0 1px 0 #0b4f9a40; }
.card .link, .modal .link { color: var(--ink); background: #eef1f6; border-color: #d9e0ea; box-shadow: 0 5px 0 #b9c6d8; }
.card .link:hover, .modal .link:hover { background: #dfe7f2; }
.msg { min-height: 22px; margin-top: 6px; font-size: 16px; line-height: 1.5; color: var(--red); }
.msg.ok { color: var(--blue-d); }

/* 모달 */
.modal { position: fixed; inset: 0; display: flex; background: #0a1c3a99; padding: 16px; z-index: 20; overflow-y: auto; }
.modal.hidden { display: none; }
.modal .card { margin: auto; display: flex; flex-direction: column; align-items: center; width: 420px; max-width: 100%; animation: popin2 .25s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes popin2 { from { transform: scale(.7); opacity: 0; } }
.lang-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 6px; }
.lang-list .pill { margin: 0; }
.lang-list .pill.on { --bg: var(--yellow); --sh: var(--yellow-d); }

@media (max-width: 640px) {
  .pill { font-size: 18px; }
  .link { font-size: 17px; padding: 8px 22px; }
}
