/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 9px 16px;
  font-size: var(--fz-md);
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--fg);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease),
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    filter var(--dur) var(--ease);
  white-space: nowrap;
  user-select: none;
}
.btn:hover { background: var(--bg-hover); }
.btn:active { transform: translateY(1px); }
.btn[disabled],
.btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--brand-gradient);
  border-color: transparent;
  color: #fff;
}
.btn-primary:hover { filter: brightness(1.1); }

.btn-ghost { background: transparent; }

.btn-danger {
  background: var(--err);
  border-color: transparent;
  color: #fff;
}

.btn-sm { padding: 6px 10px; font-size: var(--fz-sm); }
.btn-lg { padding: 12px 22px; font-size: var(--fz-lg); }
.btn-block { display: flex; width: 100%; }
.btn-icon { padding: 8px 10px; }

/* ---- Chips (topbar money/point/message) ---- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg);
  font-size: var(--fz-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.chip:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.chip .chip-label { color: var(--fg-muted); font-weight: 500; }
.chip .chip-val { color: var(--ok); font-variant-numeric: tabular-nums; }
.chip.icon { padding: 8px 10px; position: relative; }
.chip .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--err);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.chip .badge:empty { display: none; }

/* ---- Dropdown menus ---- */
.menu-wrap { position: relative; }
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 6px;
  z-index: var(--z-dropdown);
}
.dropdown a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--fz-sm);
  color: var(--fg);
  cursor: pointer;
  white-space: nowrap;
}
.dropdown a:hover { background: var(--bg-hover); color: var(--fg); }
.dropdown hr { margin: 6px 4px; }

/* ---- Forms ---- */
.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--fz-sm);
  color: var(--fg-muted);
}
.form label.required::after {
  content: "*";
  color: var(--err);
  margin-left: 4px;
}
.input,
.form input:not([type="checkbox"]):not([type="radio"]),
.form select,
.form textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--fz-md);
  outline: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.input:focus,
.form input:focus,
.form select:focus,
.form textarea:focus {
  border-color: var(--brand-pink);
  box-shadow: var(--focus-ring);
}
.form .row-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.form-err {
  min-height: 18px;
  color: var(--err);
  font-size: var(--fz-xs);
}
.form-hint {
  font-size: var(--fz-xs);
  color: var(--fg-dim);
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-label {
  display: block;
  font-size: var(--fz-sm);
  color: var(--fg-muted);
  line-height: 1.2;
}
.form-label .req {
  color: var(--err);
  margin-left: 2px;
  font-weight: 700;
}
.form-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--fz-md);
  outline: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  width: 100%;
  box-sizing: border-box;
}
.form-input:focus {
  border-color: var(--brand-pink);
  box-shadow: var(--focus-ring);
}
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.form-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: 4px;
}
.form-actions .btn-block { flex: 1; }
.modal-body .form { gap: 10px; }
.modal-body .form-err { min-height: 0; }
.modal-body .form-err:empty { display: none; }
.modal-body .form-hint { margin: 6px 0 0; }
.form-hint a { color: var(--brand-pink); }
.form-hint a:hover { text-decoration: underline; }

.form-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.015);
}
.form-section + .form-section { margin-top: -2px; }
.form-section-title {
  margin: 0;
  font-size: var(--fz-sm);
  font-weight: 700;
  color: var(--fg);
  letter-spacing: 0.4px;
  line-height: 1.2;
}
.form-label .req {
  color: var(--err);
  margin-left: 2px;
  font-weight: 700;
}
.recommender-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(232, 62, 140, 0.08);
  border: 1px solid rgba(232, 62, 140, 0.3);
  border-radius: var(--radius-sm);
  font-size: var(--fz-sm);
}
.recommender-chip strong { color: var(--fg); font-weight: 700; }
.recommender-chip .btn-sm { margin-left: auto; }

/* ---- Money forms (deposit / withdraw / point exchange) ---- */
.money-form .money-hint {
  margin: 0;
  font-size: var(--fz-sm);
  line-height: 1.5;
}
.money-form .money-warning {
  margin: 0;
  padding: 10px 12px;
  font-size: var(--fz-sm);
  color: var(--err);
  background: rgba(255, 92, 108, 0.1);
  border: 1px solid rgba(255, 92, 108, 0.3);
  border-radius: var(--radius-sm);
}
.money-input {
  font-size: var(--fz-lg);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-align: right;
}
.quick-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.quick-amount {
  flex: 1 1 calc(33.333% - 6px);
  min-width: 72px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--fz-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.quick-amount:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}
.quick-amount.clear {
  color: var(--fg-muted);
}
.balance-chip-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.balance-chip {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.balance-chip-label {
  font-size: var(--fz-xs);
  color: var(--fg-muted);
  letter-spacing: 0.3px;
}
.balance-chip-val {
  font-size: var(--fz-lg);
  font-weight: 700;
  color: var(--fg);
}
.money-kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  margin: 0;
  padding: 10px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--fz-sm);
}
.money-kv dt { color: var(--fg-muted); }
.money-kv dd { color: var(--fg); margin: 0; font-weight: 500; }

/* ---- Profile modal (accordion) ---- */
.profile-body { display: flex; flex-direction: column; gap: 10px; }
.profile-section {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.profile-section-title {
  margin: 0;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-pink);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background 0.15s ease;
}
.profile-section-title::-webkit-details-marker { display: none; }
.profile-section-title::marker { content: ''; }
.profile-section-title:hover { background: rgba(255,255,255,0.03); }
.profile-section-label { flex: 0 0 auto; }
.profile-chev {
  margin-left: auto;
  color: var(--fg-muted);
  font-size: 12px;
  transition: transform 0.2s ease;
  display: inline-block;
}
details[open] > .profile-section-title > .profile-chev {
  transform: rotate(180deg);
  color: var(--brand-pink);
}
.profile-section-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  animation: profile-slide 0.18s ease;
}
@keyframes profile-slide {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.profile-section .form { gap: 12px; }
.profile-kv {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 12px;
  margin: 0;
  font-size: var(--fz-sm);
}
.profile-kv dt { color: var(--fg-muted); }
.profile-kv dd { color: var(--fg); margin: 0; font-weight: 500; }
.profile-val-gold { color: #ffc94a; font-weight: 700; }
.profile-val-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.profile-badges { display: inline-flex; gap: 6px; }
.profile-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.profile-badge.dep { border-color: #2a9d5a; color: #5dd290; }
.profile-badge.dep:hover { background: #2a9d5a; color: #fff; }
.profile-badge.wd  { border-color: #e55353; color: #ff8a8a; }
.profile-badge.wd:hover  { background: #e55353; color: #fff; }
.profile-badge.pt  { border-color: #ffc94a; color: #ffc94a; }
.profile-badge.pt:hover  { background: #ffc94a; color: #1a1a1a; }
@media (max-width: 600px) {
  .profile-kv { grid-template-columns: 96px 1fr; }
}

/* ---- Deposit modal (screenshot layout) ---- */
.amount-form { gap: 14px; }
.amount-form .amount-display {
  width: 100%;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffc94a;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-shadow: 0 0 24px rgba(255, 201, 74, 0.25);
}
.amount-hint {
  margin: 8px 0 0;
  font-size: var(--fz-sm);
  color: var(--fg-muted);
}
.amount-quick {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.amount-quick .quick-amount {
  flex: initial;
  min-width: 0;
  padding: 14px 4px;
  font-size: var(--fz-md);
  font-weight: 600;
}
.amount-quick .quick-amount:hover {
  border-color: var(--brand-pink);
  color: var(--brand-pink);
}
.amount-actions {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 8px;
  margin-top: 6px;
}
.amount-actions .btn { padding: 12px 10px; }
.amount-actions .btn-primary {
  background: linear-gradient(135deg, #1e6e3e 0%, #2a9d5a 100%);
  color: #fff;
  font-weight: 700;
}
.amount-actions .btn-primary:hover { filter: brightness(1.12); }

/* ---- Transaction history (inline table) ---- */
.tx-history {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.tx-history-title {
  margin: 0 0 10px;
  text-align: center;
  color: var(--brand-pink);
  font-weight: 700;
  font-size: var(--fz-md);
  letter-spacing: 0.3px;
}
.tx-history-body {
  max-height: 220px;
  overflow-y: auto;
  overflow-x: auto;
}
.tx-empty {
  margin: 0;
  padding: 18px 0;
  text-align: center;
  font-size: var(--fz-sm);
}
.tx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fz-sm);
}
.tx-table thead th {
  padding: 10px 8px;
  background: linear-gradient(180deg, #1e6e3e, #175230);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}
.tx-table tbody td {
  padding: 10px 8px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
}
.tx-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.tx-table .tx-amount {
  color: #ffc94a;
  font-weight: 700;
}
.tx-table .tx-date {
  color: var(--fg-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.tx-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: var(--fz-xs);
  font-weight: 700;
  color: #fff;
}
.tx-status.pending   { background: var(--warn); }
.tx-status.approved  { background: #2a9d5a; }
.tx-status.rejected  { background: var(--err); }
.tx-status.cancelled { background: var(--fg-dim); }

@media (max-width: 640px) {
  .amount-form .amount-display { height: 72px; font-size: 32px; }
  .amount-quick { grid-template-columns: repeat(3, 1fr); }
  .amount-actions { grid-template-columns: 1fr; }
  .tx-table thead th,
  .tx-table tbody td { padding: 8px 4px; font-size: var(--fz-xs); }
}

@media (max-width: 560px) {
  .form-grid-2 { grid-template-columns: 1fr; }
  .quick-amount { flex: 1 1 calc(50% - 6px); }
}

/* ---- Modal ---- */
.modal-root:empty { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(5, 5, 12, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
  animation: fadein var(--dur) var(--ease);
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  animation: pop var(--dur) var(--ease);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}
.modal-card.size-sm { max-width: 360px; }
.modal-card.size-lg { max-width: 640px; }
.modal-card.size-xl { max-width: 900px; }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: var(--fz-lg); }
.modal-close {
  background: transparent;
  border: 0;
  color: var(--fg-muted);
  font-size: 22px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.modal-close:hover { color: var(--fg); background: var(--bg-hover); }
.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
}

@keyframes pop {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---- Toast ---- */
.toast-root { position: fixed; left: 0; right: 0; bottom: 32px; z-index: var(--z-toast); pointer-events: none; }
.toast {
  max-width: min(420px, 90vw);
  margin: 0 auto;
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: var(--radius);
  color: var(--fg);
  font-size: var(--fz-sm);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  pointer-events: auto;
}
.toast.show { opacity: 1; transform: none; }
.toast.err { border-color: rgba(255, 92, 108, 0.5); }
.toast.ok { border-color: rgba(46, 204, 113, 0.5); }
.toast.warn { border-color: rgba(255, 165, 46, 0.5); }

/* ---- Tabs ---- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-4);
}
.tab {
  padding: 10px 14px;
  background: transparent;
  border: 0;
  color: var(--fg-muted);
  font-weight: 600;
  font-size: var(--fz-sm);
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.tab:hover { color: var(--fg); }
.tab.active {
  color: var(--fg);
  border-bottom-color: var(--brand-pink);
}

/* ---- Tables ---- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fz-sm);
}
.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.table th {
  color: var(--fg-muted);
  font-weight: 600;
  font-size: var(--fz-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---- Cards ---- */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

/* ---- Grid ---- */
.grid { display: grid; gap: var(--space-4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

/* ---- Game tile ---- */
.game-tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--border);
  aspect-ratio: 3 / 4;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform var(--dur-fast) var(--ease),
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}
.game-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(232, 62, 140, 0.5);
  box-shadow: var(--shadow-glow);
}
.game-tile .art {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  background: var(--brand-gradient-strong);
}
.game-tile .label {
  position: relative;
  z-index: 2;
  padding: 10px 12px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.7));
  font-size: var(--fz-sm);
  font-weight: 600;
}
.game-tile.disabled { cursor: not-allowed; opacity: 0.55; }
.game-tile.disabled::after {
  content: "준비중";
  position: absolute;
  inset: auto 8px 8px auto;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--fg-muted);
}

/* Board list / detail (notices + events) */
.board-list-body {
  max-height: 60vh;
  overflow-y: auto;
  margin: -4px -4px 0;
  padding: 4px;
}
.board-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.board-list-compact {
  gap: 2px;
}
.board-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}
.board-row:hover {
  border-color: rgba(232, 62, 140, 0.5);
  background: rgba(232, 62, 140, 0.06);
}
.board-list-compact .board-row {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 10px 4px;
}
.board-list-compact .board-row:last-child {
  border-bottom: none;
}
.board-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  font-size: var(--fz-sm);
  font-weight: 500;
}
.board-row-title span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-row-date {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}
.board-chip {
  flex-shrink: 0;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.board-chip.popup {
  background: rgba(232, 62, 140, 0.15);
  color: #ff7fb6;
  border: 1px solid rgba(232, 62, 140, 0.35);
}
.board-empty {
  padding: 32px 12px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 10px;
}
.board-detail-head {
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.board-detail-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: var(--fz-lg);
  font-weight: 600;
}
.board-detail-date {
  font-size: 12px;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}
.board-detail-body {
  line-height: 1.7;
  font-size: var(--fz-sm);
  word-break: break-word;
}
.board-detail-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}
.board-detail-body a {
  color: var(--accent);
  text-decoration: underline;
}

/* Coupons — inbox modal */
.coupon-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.coupon-redeem {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.coupon-redeem-label {
  font-size: 12px;
  color: var(--fg-muted);
}
.coupon-redeem-row {
  display: flex;
  gap: 8px;
}
.coupon-redeem-row .form-input {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.coupon-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
}
.coupon-tab {
  padding: 8px 14px;
  background: transparent;
  border: none;
  color: var(--fg-muted);
  font-size: var(--fz-sm);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 140ms ease, border-color 140ms ease;
}
.coupon-tab:hover { color: var(--fg); }
.coupon-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.coupon-list-body {
  max-height: 50vh;
  overflow-y: auto;
  margin: 0 -4px;
  padding: 4px;
}
.coupon-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.coupon-empty {
  padding: 28px 12px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.coupon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-radius: 10px;
  border-left: 3px solid var(--accent);
}
.coupon-row.point { border-left-color: #f2c94c; }
.coupon-row-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}
.coupon-amount {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 92px;
}
.coupon-kind-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(232, 62, 140, 0.15);
  color: #ff7fb6;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.coupon-row.point .coupon-kind-tag {
  background: rgba(242, 201, 76, 0.15);
  color: #f2c94c;
}
.coupon-amount-val {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.coupon-row.point .coupon-amount-val { color: #f2c94c; }
.coupon-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.coupon-title {
  font-size: var(--fz-sm);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coupon-dates {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}
.coupon-row-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.coupon-status {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.coupon-status.unused {
  background: rgba(46, 204, 113, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(46, 204, 113, 0.35);
}
.coupon-status.used {
  background: rgba(255, 255, 255, 0.06);
  color: var(--fg-muted);
  border: 1px solid var(--border);
}
.coupon-status.expired {
  background: rgba(232, 62, 140, 0.1);
  color: #ff7fb6;
  border: 1px solid rgba(232, 62, 140, 0.3);
}

@media (max-width: 560px) {
  .coupon-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .coupon-row-side { flex-direction: row; justify-content: space-between; align-items: center; }
  .coupon-amount { min-width: 0; }
}

/* Support (1:1 문의) */
.support-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.support-toolbar {
  display: flex;
  justify-content: flex-end;
}
.support-list-body {
  max-height: 55vh;
  overflow-y: auto;
  margin: 0 -4px;
  padding: 4px;
}
.support-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.support-empty {
  padding: 28px 12px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 10px;
}
.support-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}
.support-row:hover {
  border-color: rgba(232, 62, 140, 0.5);
  background: rgba(232, 62, 140, 0.06);
}
.support-row-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.support-row-title {
  font-size: var(--fz-sm);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.support-row-meta {
  display: flex;
  gap: 6px;
  font-size: 11px;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}
.support-status {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.support-status.pending {
  background: rgba(255, 255, 255, 0.06);
  color: var(--fg-muted);
  border: 1px solid var(--border);
}
.support-status.replied {
  background: rgba(46, 204, 113, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(46, 204, 113, 0.35);
}
.support-status.new {
  background: rgba(232, 62, 140, 0.15);
  color: #ff7fb6;
  border: 1px solid rgba(232, 62, 140, 0.35);
  animation: support-pulse 1.6s ease-in-out infinite;
}
@keyframes support-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 62, 140, 0.35); }
  50%      { box-shadow: 0 0 0 4px rgba(232, 62, 140, 0); }
}

.support-detail-head {
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.support-detail-title {
  margin: 0 0 6px;
  font-size: var(--fz-lg);
  font-weight: 600;
}
.support-detail-date {
  font-size: 12px;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}
.support-message {
  padding: 14px 16px;
  margin-bottom: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-raise);
}
.support-message.answer {
  border-left: 3px solid var(--accent);
}
.support-message-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.support-message.answer .support-message-label {
  color: var(--accent);
}
.support-message-by {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.support-message-label time {
  margin-left: auto;
  font-weight: 400;
  font-size: 11px;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}
.support-message-body {
  line-height: 1.6;
  font-size: var(--fz-sm);
  word-break: break-word;
  white-space: normal;
}
.support-pending-note {
  padding: 14px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 10px;
}
.support-textarea {
  resize: vertical;
  min-height: 140px;
  font-family: inherit;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .grid-4, .grid-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .grid-4, .grid-5, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .form .row-inline { grid-template-columns: 1fr; }
}
