@import url('https://cdn.jsdelivr.net/gh/wanteddev/wanted-sans@v1.0.1/packages/wanted-sans/fonts/webfonts/variable/split/WantedSansVariable.min.css');
@import url('https://cdn.jsdelivr.net/npm/galmuri@latest/dist/galmuri.css');

/* =========================================================
   GAME UI TOKENS
========================================================= */
:root {
  --game-bg: #101820;
  --game-panel: #fff8dc;
  --game-panel-2: #f7edc4;
  --game-panel-light: #fffdf0;
  --game-line: #2f2f2f;
  --game-text: #1f2933;
  --game-muted: #6b7280;

  --game-blue: #5b8cff;
  --game-blue-dark: #22314d;
  --game-green: #4caf50;
  --game-green-dark: #14532d;
  --game-red: #e85d4f;
  --game-orange: #f59e0b;
  --game-yellow: #ffe8a3;

  --main: var(--game-blue);
  --red: var(--game-red);
  --orange: var(--game-orange);
  --green: var(--game-green);
  --blue: var(--game-blue);
  --text: var(--game-text);
  --gray: var(--game-muted);
  --line: var(--game-line);
  --card: var(--game-panel);

  --page-width: 1100px;
  --page-x: 20px;

  --pixel-shadow: 4px 4px 0 #000;
  --pixel-shadow-sm: 3px 3px 0 #000;
  --pixel-inset:
    inset -2px -2px rgba(0, 0, 0, .18),
    inset 2px 2px rgba(255, 255, 255, .35);
}

/* =========================================================
   BASE
========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  font-family:"Wanted Sans Variable"
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .04) 25%, transparent 25%) 0 0 / 24px 24px,
    linear-gradient(135deg, transparent 75%, rgba(255, 255, 255, .04) 75%) 0 0 / 24px 24px,
    var(--game-bg);
  color: var(--game-text);
  font-family: "Wanted Sans Variable", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.header,
.app {
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: var(--page-x);
}

[hidden] {
  display: none !important;
}

body.is-auth-checking .header,
body.is-auth-checking .app {
  display: none;
}

.header__user,
.my-dashboard__greeting,
.member-section h2,
.admin-section__toggle span,
.login-card__title,
.auth-card__title,
.modal-title,
.modal-content h2,
.ranking-title,
.member-card__name,
.player-name,
.my-dashboard__count,
.my-dashboard__message,
.member-card__title {
  font-family: Galmuri9, "Wanted Sans Variable", sans-serif;
  letter-spacing: .4px;
}

/* =========================================================
   PIXEL PANEL
========================================================= */
.header__inner,
.my-dashboard,
.member-section,
.member-card,
.admin-card,
.login-card,
.auth-card,
.modal-content {
  border: 3px solid var(--game-line);
  border-radius: 0;
  background: var(--game-panel);
  box-shadow:
    var(--pixel-shadow),
    inset 0 0 0 3px rgba(255, 255, 255, .45);
}

/* =========================================================
   BUTTONS
========================================================= */
button,
.btn,
.login-btn,
.auth-btn,
.admin-card__button,
.admin-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 36px;
  padding: 8px 14px;

  border: 3px solid var(--game-blue-dark);
  border-radius: 0;

  background: var(--game-blue);
  color: #fff;

  box-shadow:
    var(--pixel-inset),
    var(--pixel-shadow-sm);

  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;

  cursor: pointer;
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
}

button:hover,
.btn:hover,
.login-btn:hover,
.auth-btn:hover {
  background: #73a0ff;
  color: #fff;
  transform: translate(-1px, -1px);
  box-shadow:
    var(--pixel-inset),
    4px 4px 0 #000;
}

button:active,
.btn:active,
.login-btn:active,
.auth-btn:active {
  transform: translate(2px, 2px);
  box-shadow:
    inset 2px 2px rgba(0, 0, 0, .18),
    1px 1px 0 #000;
}

button.active,
button.is-active,
.btn.active {
  background: var(--game-green);
  border-color: var(--game-green-dark);
  color: #fff;
}

button:disabled,
.btn:disabled,
.is-loading {
  opacity: .55;
  cursor: wait;
  transform: none;
}

.btn-icon {
  width: 15px;
  height: 15px;
  object-fit: contain;
}

#excelDownloadBtn,
.header-setting__group button,
.admin-card__button--warning,
.admin-action-btn--warning {
  background: var(--game-yellow);
  color: #3b2f1e;
  border-color: #8a6d1d;
}

#logoutBtn,
.admin-card__button--danger,
.admin-action-btn--danger {
  background: var(--game-red);
  border-color: #7f1d1d;
}

.admin-card__button--black,
.admin-action-btn--black {
  background: #111827;
  border-color: #000;
}

.photo-view-btn,
.auth-btn--normal,
.admin-card__button--normal,
.admin-action-btn--normal,
.status-choice__btn,
.my-dashboard__sub-btn,
.my-dashboard__status-btn {
  background: var(--game-panel-light);
  color: var(--game-text);
  border-color: var(--game-line);
}

#checkBtn,
#saveCheckBtn,
.my-dashboard__main-btn,
.login-btn--primary,
.auth-btn--primary,
#saveNicknameBtn {
  background: var(--game-blue);
  border-color: var(--game-blue-dark);
  color: #fff;
}

.text-btn{
    padding:0;
    background:none;
    border:0;
    box-shadow:none;
    color:var(--game-green);
    font:inherit;
    cursor:pointer;
}

.text-btn:hover{
    text-decoration:underline;
    padding:0;
    background:none;
    border:0;
    box-shadow:none;
    font:inherit;
    cursor:pointer;
    color:var(--game-green);
}

.text-btn:focus-visible{
    outline:2px solid var(--game-green);
    outline-offset:2px;
}

/* =========================================================
   FORMS
========================================================= */
input,
select,
.form-field {
  min-width: 0;
  max-width: 100%;

  border: 3px solid var(--game-line);
  border-radius: 0;
  background: var(--game-panel-light);
  color: var(--game-text);

  font-family: inherit;
  font-size: 13px;
  font-weight: 700;

  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease;
}

input,
select {
  padding: 9px 14px;
}

input::placeholder {
  color: #9a9680;
}

input:focus,
select:focus,
.form-field:focus-within {
  border-color: var(--game-blue-dark);
  box-shadow: 3px 3px 0 #000;
}

input[type="search"]::-webkit-search-cancel-button {
  opacity: .45;
}

input[type="month"],
select {
  cursor: pointer;
}

select {
  padding-right: 40px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%232f2f2f' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.form-field {
  height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-field i {
  width: 16px;
  color: var(--game-muted);
  font-size: 14px;
  text-align: center;
}

.form-field input {
  flex: 1;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.nickname-field {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.nickname-field .form-field {
  flex: 1 1 auto;
}

#checkNewNicknameBtn,
#checkNicknameBtn {
  flex-shrink: 0;
  min-width: 84px;
  margin-top: 0;
  background: var(--game-muted);
  border-color: var(--game-line);
}

#checkNewNicknameBtn:disabled,
#checkNicknameBtn:disabled {
  background: var(--game-green);
  border-color: var(--game-green-dark);
  opacity: 1;
  cursor: default;
}

#saveNicknameBtn {
  width: 100%;
  height: 46px;
  margin-top: 10px;
}

.form-field.is-error {
  border-color: var(--game-red);
  box-shadow: 3px 3px 0 #7f1d1d;
  animation: shake .25s;
}

.form-field.is-success {
  border-color: var(--game-green);
  box-shadow: 3px 3px 0 var(--game-green-dark);
}

.form-message {
  margin: 6px 2px;
  color: var(--game-red);
  font-size: 13px;
  font-weight: 800;
  animation: fadeIn .2s;
}

.form-message--success {
  color: var(--game-green-dark);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   HEADER
========================================================= */
.header__inner {
  width: 100%;
  margin: 14px 0 24px;
  padding: 12px 16px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header__user {
  color: var(--game-text);
  font-size: 15px;
  font-weight: 900;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header__actions button {
  padding: 8px 12px;
}

.header-setting {
  position: relative;
}

.header-setting__menu {
  display: none;

  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 200;

  min-width: 210px;
  padding: 10px;

  border: 3px solid var(--game-line);
  background: var(--game-panel);
  box-shadow: 4px 4px 0 #000;
}

.header-setting__menu.open {
  display: grid;
  gap: 8px;
}

.header-setting__menu button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.header-setting__menu hr {
  width: 100%;
  margin: 4px 0;

  border: 0;
  border-top: 3px solid var(--game-line);
}

.header-setting__group {
  display: grid;
  gap: 8px;
}

.header-setting__logout {
  background: var(--game-red);
  border-color: #7f1d1d;
}

/* =========================================================
   DASHBOARD
========================================================= */
.my-dashboard {
  position: relative;
  margin-bottom: 24px;
  padding: 26px;
}

.my-dashboard::before {
  content: "STATUS";
  position: absolute;
  top: -16px;
  left: 18px;
  padding: 4px 10px;
  border: 3px solid var(--game-line);
  background: var(--game-panel-2);
  box-shadow: var(--pixel-shadow-sm);
  font-family: Galmuri9;
  font-size: 13px;
  font-weight: 900;
}

.my-dashboard__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.my-dashboard__greeting {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}

.player-label {
  color: var(--game-muted);
  font-size: 12px;
  font-weight: 900;
}

.player-name {
  font-size: 24px;
  color: var(--game-text);
}

.my-dashboard__status {
  padding: 7px 10px;
  border: 3px solid var(--game-line);
  background: #d9f99d;
  color: #166534;
  box-shadow: var(--pixel-shadow-sm);
  font-size: 13px;
  font-weight: 900;
}

.my-dashboard__body {
  margin-top: 22px;
}

.my-dashboard__label {
  margin: 0 0 8px;
  color: var(--game-muted);
  font-size: 14px;
  font-weight: 900;
}

.my-dashboard__week,
.my-dashboard__dots {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.my-dashboard__week {
  margin-bottom: 8px;
}

.my-dashboard__week span {
  color: var(--game-muted);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.my-dashboard__dots {
  margin-bottom: 12px;
  padding: 4px;
  border: 3px solid var(--game-line);
  background: #d6d3b1;
  box-shadow: inset 2px 2px rgba(0, 0, 0, .2);
}

.my-dashboard__dots span {
  height: 18px;
  background: transparent;
}

.my-dashboard__dots span.is-filled {
  background: var(--game-green);
  box-shadow: inset -2px -2px rgba(0, 0, 0, .2);
}

.my-dashboard__count {
  display: block;
  color: var(--game-green-dark);
  font-size: 28px;
  font-weight: 900;
}

.my-dashboard__message {
  display: inline-block;
  margin: 10px 0 0;
  padding: 8px 10px;
  border: 3px solid var(--game-line);
  background: var(--game-panel-light);
  box-shadow: var(--pixel-shadow-sm);
  font-weight: 900;
}

.my-dashboard__rule {
  margin: 8px 0 0;
  color: var(--game-muted);
  font-size: 13px;
  line-height: 1.5;
}

.my-dashboard__today {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 3px dashed var(--game-line);
}

.my-dashboard__today p {
  margin: 0 0 12px;
  font-weight: 900;
}

.my-dashboard__status-btn {
  margin-top: 14px;
}

/* =========================================================
   MEMBER SECTION / FILTERS
========================================================= */
.member-section {
  height: 80vh;
  margin-bottom: 32px;
  padding: 0 12px;

  display: flex;
  flex-direction: column;

  overflow-y: auto;
}

.member-section__head {
  flex-shrink: 0;
  padding: 20px 0;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  border-bottom: 3px dashed var(--game-line);
}

.week-filter,
.filter,
.member-info {
  display: flex;
  align-items: center;
}

.week-filter {
  flex: 0 0 auto;
  gap: 8px;
  min-width: 0;
}

.week-filter input,
.week-filter select {
  flex: 0 1 auto;
  min-width: 0;
}

.filter {
  flex: 0 0 auto;
  gap: 8px;
}

.member-info {
  gap: 8px;
  color: var(--game-muted);
  font-size: 13px;
}

.member-status {
  flex-shrink: 0;
}

.member-count {
  padding: 4px 8px;
  border: 2px solid var(--game-line);
  background: var(--game-panel-2);
}

.is-danger .member-count {
  color: var(--game-red);
  font-weight: 900;
}

.member-card__hint {
  display: block;
  margin-top: 4px;
  color: var(--game-orange);
  font-size: 13px;
  font-weight: 900;
}

.search-box {
  flex: 1 1 auto;
  min-width: 180px;
}

.search-box input {
  width: 100%;
}

#memberSearchInput {
  padding-left: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%232f2f2f' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344l3.387 3.387-.707.707-3.387-3.387A6 6 0 1111.742 10.344zM6.5 11A4.5 4.5 0 106.5 2a4.5 4.5 0 000 9z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 14px center;
}

/* =========================================================
   MEMBER LIST / RPG CARD
========================================================= */
#memberList {
  flex: 1;
  overflow-y: auto;

  display: grid;
  gap: 14px;
  align-content: start;

  margin: 12px 0;
  padding: 0;
  list-style: none;
}

#memberList li {
  display: block;
}

.member-card {
  position: relative;
  min-width: 0;
  padding: 18px;
  font-size: 14px;
}

.member-card.is-danger,
.admin-card.is-danger {
  background: #ffe2c6;
  border-color: var(--game-red);
}

.member-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.member-card__profile {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.pixel-avatar,
.avatar-frame,
.ranking-item__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 3px solid var(--game-line);
  background: var(--game-panel-light);
  box-shadow:
    var(--pixel-inset),
    var(--pixel-shadow-sm);
}

.pixel-avatar {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  font-size: 28px;
  line-height: 1;
}

.avatar-frame {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.member-card__name {
  display: block;
  color: var(--game-text);
  font-size: 20px;
  font-weight: 900;
}

.member-card__level {
  display: block;
  margin-top: 4px;
  color: var(--game-muted);
  font-size: 12px;
  font-weight: 900;
}

.member-card__title {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 8px;
  border: 2px solid var(--game-line);
  background: var(--game-yellow);
  color: #3b2f1e;
  box-shadow: 2px 2px 0 #000;
  font-size: 12px;
  line-height: 1;
}

.member-card__badges {
  display: flex;
  align-items: center;
  gap: 4px;
}

.member-exp {
  height: 18px;
  margin: 12px 0;
  border: 3px solid var(--game-line);
  background: #d6d3b1;
  box-shadow: inset 2px 2px rgba(0, 0, 0, .18);
}

.member-exp__fill {
  display: block;
  height: 100%;
  background: var(--game-green);
}

.member-card__body {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-card__meta,
.status-badge,
.warning,
.approve-label,
.role-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;

  padding: 6px 10px;

  border: 2px solid var(--game-line);
  border-radius: 0;
  background: var(--game-panel-2);
  color: var(--game-text);

  font-size: 13px;
  font-weight: 900;
}

.member-card__warning,
.warning {
  background: #fef3c7;
  color: #92400e;
}

.member-card__warning--ban,
.warning--ban {
  background: #fee2e2;
  color: #991b1b;
}

.warning--none {
  background: #e5e7eb;
  color: var(--game-muted);
}

.status-badge--normal {
  background: #dcfce7;
  color: #166534;
}

.status-badge--busy {
  background: #fef3c7;
  color: #92400e;
}

.status-badge--injured {
  background: #fee2e2;
  color: #991b1b;
}

.photo-view-btn {
  min-width: 34px;
  min-height: 34px;
  padding: 6px 10px;
}

/* =========================================================
   RANKING
========================================================= */
.ranking-title,
.ranking-date {
  text-align: center;
}

.ranking-date {
  margin: 4px 0 16px;
  color: var(--game-muted);
  font-size: 13px;
}

.ranking-list,
#rankingList {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-item {
  display: grid;
  grid-template-columns: 38px 42px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 2px solid var(--game-line);
  background: var(--game-panel-2);
  font-size: 14px;
}

.ranking-item--top {
  background: var(--game-yellow);
}

.ranking-item__rank {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 2px solid var(--game-line);
  background: var(--game-panel-light);
  box-shadow: 2px 2px 0 #000;
  font-size: 15px;
  font-weight: 900;
}

.ranking-item__avatar {
  width: 36px;
  height: 36px;
  font-size: 20px;
}

.ranking-item__info {
  min-width: 0;
}

.ranking-item__name {
  color: var(--game-text);
  font-weight: 900;
}

.ranking-item__title {
  display: block;
  margin-top: 3px;
  color: var(--game-muted);
  font-size: 12px;
  font-weight: 800;
}

.ranking-item__count {
  padding: 4px 8px;
  border: 2px solid var(--game-line);
  background: #dbeafe;
  color: var(--game-blue-dark);
  font-size: 12px;
  font-weight: 900;
}

/* =========================================================
   ADMIN
========================================================= */
.admin-page {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .03) 25%, transparent 25%) 0 0 / 24px 24px,
    #0a0f14;
}

.admin-page .member-section {
  gap: 22px;
  padding: 0 16px 24px;
}

.admin-page .member-section__head {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--game-panel);
}

.admin-section {
  flex-shrink: 0;
}

.admin-section__toggle {
  all: unset;
  width: 100%;
  padding: 16px 4px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  border-bottom: 3px dashed var(--game-line);
  cursor: pointer;
}

.admin-section__toggle::after {
  content: "▼";
  font-family: Galmuri9;
  font-size: 16px;
}

.admin-section:not(.is-open) .admin-section__toggle::after {
  content: "▶";
}

.admin-section__toggle span {
  color: var(--game-text);
  font-size: 18px;
  font-weight: 900;
}

.admin-section__body {
  overflow: hidden;
  opacity: 0;
  transition: max-height .35s ease, opacity .25s ease;
}

.admin-section.is-open .admin-section__body {
  margin-top: 15px;
  overflow: visible;
  opacity: 1;
}

.admin-section ul {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-card,
.admin-page #memberList li.admin-card {
  min-width: 0;
  padding: 18px;
  font-size: 14px;
}

.admin-card--empty {
  color: var(--game-muted);
  font-weight: 900;
  text-align: center;
}

.admin-card__top {
  margin-bottom: 14px;
}

.admin-card__name,
.admin-card__badges,
.admin-card__actions,
.admin-actions {
  display: flex;
  align-items: center;
}

.admin-card__name {
  gap: 8px;
}

.admin-card__name strong {
  color: var(--game-text);
  font-family: Galmuri9;
  font-size: 18px;
  font-weight: 900;
}

.admin-card__badges {
  gap: 4px;
}

.admin-card__badge {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 2px solid var(--game-line);
  background: var(--game-panel-light);
  box-shadow: 2px 2px 0 #000;
  font-size: 15px;
  line-height: 1;
  cursor: default;
}

button.admin-card__badge,
.admin-card__photo {
  cursor: pointer;
}

.admin-card__body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-card__meta {
  padding: 12px;
  border: 2px solid var(--game-line);
  background: var(--game-panel-2);
}

.admin-card__meta span {
  display: block;
  margin-bottom: 4px;
  color: var(--game-muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-card__meta strong {
  color: var(--game-text);
  font-size: 15px;
  font-weight: 900;
}

.admin-card__warning {
  color: #991b1b;
  font-weight: 900;
}

.admin-card__actions,
.admin-actions {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.admin-card__more {
  position: relative;
}

.admin-card__button,
.admin-action-btn {
  min-height: 34px;
  padding: 0 12px;
}

.more-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 999;
  min-width: 170px;
  padding: 10px;
  border: 3px solid var(--game-line);
  background: var(--game-panel-light);
  box-shadow: var(--pixel-shadow);
}

.more-menu.open {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.more-menu hr {
  width: 100%;
  margin: 4px 0;
  border: 0;
  border-top: 3px dashed var(--game-line);
}

.approve-label,
.role-label {
  justify-content: center;
  background: #dbeafe;
  color: var(--game-blue-dark);
}

/* =========================================================
   AUTH / LOGIN / JOIN
========================================================= */
.login-page,
.auth-page {
  min-height: 100vh;
  padding: 24px;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    linear-gradient(135deg, rgba(255, 255, 255, .04) 25%, transparent 25%) 0 0 / 24px 24px,
    var(--game-bg);
}

.login-card,
.auth-card {
  width: min(100%, 380px);
  padding: 32px 28px;
}

.login-card__title,
.auth-card__title {
  margin: 0 0 24px;
  color: var(--game-text);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.auth-card__desc {
  margin: 0 0 24px;
  color: var(--game-muted);
  text-align: center;
}

.login-form,
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-btn,
.auth-btn {
  width: 100%;
  height: 46px;
  margin-top: 10px;
}

.auth-links{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:10px;
}

.auth-links .btn {
  color: var(--gray);
}

/* =========================================================
   AVATAR
========================================================= */
.avatar-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.avatar-option {
  flex-direction: column;
  height: 84px;
  gap: 6px;
  padding: 10px;
}

.avatar-option span {
  font-size: 28px;
}

.avatar-option small {
  font-size: 12px;
  font-weight: 900;
}

.avatar-option.is-selected {
  background: var(--game-green);
  border-color: var(--game-green-dark);
}

/* =========================================================
   MODAL
========================================================= */
.modal-group {
  display: contents;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;
  background: rgba(16, 24, 32, .78);

  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}

.modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  width: min(100%, 460px);
  max-height: 80vh;
  overflow: auto;
  padding: 28px 24px 24px;
  transform: translateY(12px);
  transition: transform .18s ease;
}

.modal-content > :not(.modal-close) + :not(.modal-close) {
  margin-top: 8px;
}

.modal.open .modal-content {
  transform: translateY(0);
}

.modal-content h2,
.modal-title {
  margin: 0 44px 10px 0;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.3;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;

  width: 38px;
  height: 38px;
  padding: 0;

  border: 3px solid var(--game-line);
  background: var(--game-red);
  color: #fff;
  box-shadow: var(--pixel-shadow-sm);

  font-size: 22px;
  line-height: 1;
}

.photo-preview {
  display: block;
  width: 100%;
  margin-top: 20px;
  border: 3px solid var(--game-line);
  background: #fff;
  box-shadow: var(--pixel-shadow-sm);
  object-fit: cover;
}

/* =========================================================
   TOAST
========================================================= */
.toast-container {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 99999;

  display: flex;
  flex-direction: column;
  gap: 8px;

  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  min-width: 230px;
  max-width: calc(100vw - 32px);
  padding: 12px 16px;

  border: 3px solid #000;
  background: #111827;
  color: #fff;
  box-shadow: var(--pixel-shadow-sm);

  font-family: Galmuri9;
  font-size: 13px;
  font-weight: 900;
  text-align: center;

  opacity: 0;
  transform: translateY(10px);
  transition: .2s ease;
  pointer-events: auto;
}

.toast.is-show {
  opacity: 1;
  transform: translateY(0);
}

.toast--success { background: var(--game-green); }
.toast--error { background: var(--game-red); }
.toast--warning { background: var(--game-orange); }

/* =========================================================
   MOBILE
========================================================= */
@media (max-width: 768px) {
  :root {
    --page-x: 12px;
  }

  .header__inner {
    flex-wrap: wrap;
    gap: 5px;
  }

  .header__actions {
    flex-wrap: wrap;
  }

  .header-setting__menu {
    right: 0;
    width: min(230px, calc(100vw - 24px));
  }

  .admin-page .header__inner,
  .admin-page .header__actions {
    flex-wrap: nowrap;
  }

  .admin-page .header__actions {
    width: auto;
    overflow: visible;
  }

  .admin-page .header__actions .btn,
  .admin-page .header__actions button {
    white-space: nowrap;
  }

  .my-dashboard {
    padding: 22px 18px;
  }

  .my-dashboard__head {
    align-items: flex-start;
  }

  .my-dashboard__greeting,
  .player-name {
    font-size: 20px;
  }

  .my-dashboard__count {
    font-size: 24px;
  }

  .my-dashboard__main-btn,
  .my-dashboard__sub-btn,
  .my-dashboard__status-btn {
    width: 100%;
    margin-left: 0;
    margin-top: 8px;
  }

  .member-section {
    height: calc(100vh - 120px);
  }

  .member-section__head {
    flex-wrap: wrap;
  }

  .week-filter {
    width: 100%;
  }

  .week-filter input { flex: 3; }
  .week-filter select { flex: 1; }

  .search-box,
  .filter {
    flex: 1 1 100%;
    min-width: 0;
  }

  .filter button {
    flex: 1;
  }

  .member-card__top,
  .my-dashboard__head {
    align-items: flex-start;
  }

  .admin-card__body {
    grid-template-columns: 1fr;
  }

  .admin-card__actions,
  .admin-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .admin-card__button,
  .admin-action-btn {
    width: 100%;
  }

  .admin-card__more {
    grid-column: 1 / -1;
  }

  .more-menu {
    left: 0;
    right: auto;
    width: 100%;
  }

  .ranking-item {
    grid-template-columns: 32px 36px 1fr auto;
    gap: 8px;
  }

  .modal-content {
    padding: 24px 18px 20px;
  }
}
