* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0f;
  --bg-card: #10101a;
  --bg-elevated: #17172a;
  --gold: #c9a227;
  --gold-bright: #e8c547;
  --gold-glow: rgba(201, 162, 39, 0.12);
  --border: rgba(201, 162, 39, 0.22);
  --border-dim: rgba(255, 255, 255, 0.05);
  --text: #d4c5a9;
  --text-bright: #f0e6c8;
  --text-dim: #6e6048;
  --red: #f87171;
  --red-dim: rgba(239, 68, 68, 0.25);
  --red-border: rgba(239, 68, 68, 0.35);
  --blue: #5865f2;
}

body {
  font-family: 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ─── Nav ─── */
nav {
  background: #0d0d16;
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(201, 162, 39, 0.25);
  position: sticky;
  top: 0;
  z-index: 50;
}

nav .logo {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(120deg, #c9a227 0%, #e8c547 50%, #c9a227 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.3px;
}

.nav-right { display: flex; align-items: center; gap: 16px; }
.user-info { font-size: 14px; color: var(--text); }

.guild-select {
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  color: var(--gold-bright);
  -webkit-text-fill-color: var(--gold-bright);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  letter-spacing: -0.2px;
}
.guild-select:focus { outline: none; border-color: var(--gold); }

/* ─── Buttons ─── */
.btn {
  padding: 8px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  transition: all 0.18s;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); opacity: 1; }

.btn-discord { background: var(--blue); color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(201, 162, 39, 0.4);
}
.btn-outline:hover { background: var(--gold-glow); opacity: 1; }
.btn-primary {
  background: linear-gradient(135deg, #c9a227, #e8c547);
  color: #08080e;
}
.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red-border);
}
.btn-danger:hover { background: var(--red-dim); opacity: 1; }

/* ─── Tabs ─── */
.tabs {
  display: flex;
  gap: 2px;
  padding: 0 28px;
  background: #0d0d16;
  border-bottom: 1px solid rgba(201, 162, 39, 0.15);
}

.tab {
  padding: 14px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-dim);
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.18s, border-color 0.18s;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--gold-bright);
  font-weight: 700;
  border-bottom-color: var(--gold-bright);
}

/* ─── Content ─── */
.content { padding: 28px; max-width: 960px; margin: 0 auto; transition: max-width 0.2s; }
.content.wide-calendar { max-width: 1400px; }
.section { display: none; }
.section.active { display: block; }

/* ─── Party Cards ─── */
.party-grid { display: grid; gap: 16px; }

.party-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 22px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.party-card:hover {
  border-color: rgba(201, 162, 39, 0.5);
  box-shadow: 0 0 28px rgba(201, 162, 39, 0.07);
}

.party-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.raid-title { font-size: 18px; font-weight: 700; color: var(--text-bright); }
.raid-sub { font-size: 13px; color: var(--text-dim); margin-top: 3px; }

.party-date {
  font-size: 12px;
  font-weight: 600;
  background: rgba(201, 162, 39, 0.08);
  padding: 5px 12px;
  border-radius: 20px;
  color: var(--gold-bright);
  border: 1px solid rgba(201, 162, 39, 0.3);
  white-space: nowrap;
}

.participants-row { display: flex; gap: 16px; margin-top: 14px; }
.participant-group { flex: 1; }

.group-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.participant-list { display: flex; flex-direction: column; gap: 5px; }

.participant-item {
  font-size: 13px;
  color: var(--text);
  background: var(--bg-elevated);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-dim);
}
.participant-item .lv { font-size: 11px; color: var(--text-dim); margin-top: 3px; }

.empty-slot {
  font-size: 12px;
  color: var(--text-dim);
  padding: 8px 12px;
  border: 1px dashed rgba(201, 162, 39, 0.14);
  border-radius: 8px;
  text-align: center;
}

.closed-badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--red-dim);
  color: var(--red);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--red-border);
}

/* ─── Char Cards ─── */
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }

.char-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.char-card:hover { border-color: rgba(201, 162, 39, 0.5); }

.char-name { font-size: 16px; font-weight: 700; color: var(--text-bright); }
.char-class { font-size: 13px; color: var(--gold); margin-top: 3px; font-weight: 600; }
.char-stats { margin-top: 12px; display: flex; flex-direction: column; gap: 5px; }
.char-stat { font-size: 13px; color: var(--text-dim); display: flex; justify-content: space-between; }
.char-stat span { color: var(--text); }

/* ─── Login Prompt ─── */
.login-prompt { text-align: center; padding: 80px 20px; color: var(--text-dim); }
.login-prompt h2 { font-size: 24px; color: var(--text-bright); margin-bottom: 12px; }
.login-prompt p { margin-bottom: 28px; }

/* ─── Date Groups ─── */
.date-group { margin-bottom: 28px; }
.date-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.3px;
}

.empty-state { text-align: center; padding: 48px; color: var(--text-dim); }

/* ─── Modal ─── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal {
  background: #0f0f1c;
  border-radius: 16px;
  width: 100%;
  max-width: 460px;
  border: 1px solid rgba(201, 162, 39, 0.32);
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; color: var(--text-bright); font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  transition: color 0.18s;
  font-family: inherit;
}
.modal-close:hover { color: var(--text); }

.modal-body { padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }

.modal-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.form-group select, .form-group input {
  background: var(--bg);
  border: 1px solid rgba(201, 162, 39, 0.25);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  width: 100%;
  font-family: inherit;
  transition: border-color 0.18s;
}
.form-group select:focus, .form-group input:focus {
  outline: none;
  border-color: var(--gold);
}
.form-group input::placeholder { color: var(--text-dim); }

.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* ─── Create Button ─── */
.create-btn-wrap { display: flex; justify-content: flex-end; margin-bottom: 18px; }

/* ─── Party Actions ─── */
.party-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* ─── View Tabs (member section) ─── */
.view-tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.view-tab {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s;
}
.view-tab:hover { color: var(--text); border-color: rgba(201, 162, 39, 0.4); }
.view-tab.active {
  background: rgba(201, 162, 39, 0.14);
  color: var(--gold-bright);
  border-color: var(--gold);
  font-weight: 700;
}

/* ─── Member Grid ─── */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.member-card { background: var(--bg-card); border-radius: 14px; padding: 18px; border: 1px solid var(--border); }
.member-name { font-size: 15px; font-weight: 700; color: var(--text-bright); margin-bottom: 12px; }
.member-chars { display: flex; flex-direction: column; gap: 6px; }
.member-char-row { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text); }
.main-char .char-name-text { color: var(--text-bright); font-weight: 700; }
.char-name-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.char-class-text { color: var(--text-dim); font-size: 12px; }
.char-il { font-size: 12px; color: var(--gold); white-space: nowrap; font-weight: 600; }

/* ─── Role Badges ─── */
.char-role-badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 700;
}
.char-role-badge.dealer {
  background: rgba(88, 101, 242, 0.18);
  color: #7eb8f7;
  border: 1px solid rgba(88, 101, 242, 0.3);
}
.char-role-badge.supporter {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

/* ─── Rank Table ─── */
.rank-table { display: flex; flex-direction: column; gap: 4px; }
.rank-header {
  display: grid;
  grid-template-columns: 40px 1fr 1fr 70px 90px 90px 1fr;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.rank-row {
  display: grid;
  grid-template-columns: 40px 1fr 1fr 70px 90px 90px 1fr;
  padding: 10px 14px;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border-dim);
  font-size: 13px;
  color: var(--text);
  align-items: center;
  transition: border-color 0.15s;
}
.rank-row:hover { border-color: var(--border); }
.rank-num { color: var(--gold); font-weight: 700; }
.rank-discord { color: var(--text-dim); font-size: 12px; }

/* 6-col (서포터 목록) */
.rank-table-6 .rank-header,
.rank-table-6 .rank-row { grid-template-columns: 40px 1fr 1fr 90px 90px 1fr; }

/* 3-col (통계 상세) */
.rank-table-3 .rank-header,
.rank-table-3 .rank-row { grid-template-columns: 1fr 80px 60px; }

/* ─── Class Distribution ─── */
.dist-summary { display: flex; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.dist-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 22px;
  text-align: center;
  min-width: 100px;
  flex: 1;
}
.dist-box.supporter-box { border-color: rgba(168, 85, 247, 0.4); }
.dist-label {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dist-value { font-size: 26px; font-weight: 800; color: var(--text-bright); }

.class-list { display: flex; flex-direction: column; gap: 10px; }
.class-row { display: flex; align-items: center; gap: 12px; }
.class-name { font-size: 13px; color: var(--text); width: 100px; flex-shrink: 0; }
.class-bar-wrap {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}
.class-bar {
  height: 100%;
  background: linear-gradient(90deg, #c9a227, #e8c547);
  border-radius: 4px;
  transition: width 0.5s ease;
}
.class-cnt { font-size: 13px; color: var(--text-dim); width: 32px; text-align: right; flex-shrink: 0; }

/* ─── Stats ─── */
.stats-wrap { display: flex; flex-direction: column; gap: 24px; }
.stats-chart-box {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 22px;
  border: 1px solid var(--border);
}
.stats-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 18px;
}
.stats-detail-box {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 22px;
  border: 1px solid var(--border);
}
.stats-char-block { margin-bottom: 22px; }
.stats-char-block:last-child { margin-bottom: 0; }
.stats-char-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-radius: 8px;
  margin-bottom: 6px;
}
.stats-char-name { font-weight: 700; color: var(--text-bright); }
.stats-char-class { color: var(--text-dim); font-size: 13px; }
.stats-char-total { margin-left: auto; color: var(--gold); font-weight: 700; }

/* ─── Party Toolbar: 1행 뷰토글+등록버튼 / 2행 필터 ─── */
.party-toolbar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.party-toolbar-row .view-tabs { margin-bottom: 0; }
.party-register-btn { margin-left: auto; }

.party-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 12px;
}
/* 자유검색(왼쪽)과 구조화된 필터(오른쪽) 그룹 구분 */
.party-filter-bar .filter-search { margin-right: auto; }
.party-filter-bar .filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-left: 12px;
  border-left: 1px solid var(--border-dim);
}

.filter-search {
  padding: 7px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  min-width: 160px;
}
.filter-search:focus { outline: none; border-color: var(--gold); }

.filter-chip {
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s;
}
.filter-chip:hover { color: var(--text); border-color: rgba(201, 162, 39, 0.4); }
.filter-chip.active {
  background: rgba(201, 162, 39, 0.14);
  color: var(--gold-bright);
  border-color: var(--gold);
  font-weight: 700;
}

.filter-raid-dropdown { position: relative; }
.filter-raid-dropdown summary {
  list-style: none;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.filter-raid-dropdown summary::-webkit-details-marker { display: none; }
.filter-raid-dropdown[open] summary { color: var(--gold-bright); border-color: var(--gold); }
.filter-raid-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.filter-raid-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.filter-raid-item:hover { background: rgba(201, 162, 39, 0.08); }
.filter-raid-item small { color: var(--text-dim); }
.filter-raid-clear {
  margin-top: 4px;
  padding: 6px 8px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--red);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.filter-raid-clear:hover { background: var(--red-dim); }

/* ─── Weekly Calendar ─── */
.calendar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.calendar-range-label { color: var(--text-bright); font-weight: 700; font-size: 14px; }

.calendar-scroll { overflow-x: auto; padding-bottom: 8px; }
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  gap: 10px;
}
.calendar-day-col {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.calendar-day-col.today { border-color: var(--gold); background: var(--gold-glow); }
.calendar-day-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
}
.calendar-day-header span { color: var(--text-dim); font-weight: 500; }
.calendar-day-body { display: flex; flex-direction: column; gap: 10px; max-height: 640px; overflow-y: auto; }
.calendar-day-empty { color: var(--text-dim); font-size: 12px; text-align: center; padding: 12px 0; }

/* ─── 컴팩트 캘린더 카드 ─── */
.compact-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.compact-card:hover { border-color: var(--gold); box-shadow: 0 0 14px rgba(201, 162, 39, 0.1); }
.compact-card-time { font-size: 12px; color: var(--gold); font-weight: 700; }
.compact-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-bright);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compact-card-title small { font-size: 11px; color: var(--text-dim); font-weight: 500; }
.compact-card-slots { display: flex; gap: 6px; margin-top: 6px; }
.compact-card-memo {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
}
.slot-badge.open { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.slot-badge.full { background: rgba(255, 255, 255, 0.06); color: var(--text-dim); }
.slot-badge.closed { background: var(--red-dim); color: var(--red); }

.compact-card.ended {
  cursor: pointer;
  opacity: 0.5;
  filter: grayscale(0.6);
}
.compact-card.ended:hover { border-color: var(--border); box-shadow: none; opacity: 0.75; }

.compact-card-detail {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-dim);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.compact-detail-label { font-size: 10px; color: var(--text-dim); font-weight: 700; }
.compact-detail-member { font-size: 11px; color: var(--text); }
.compact-detail-member.empty { color: var(--text-dim); font-style: italic; }

/* 리스트로 이동했을 때 해당 카드 강조 */
@keyframes highlight-flash-anim {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 162, 39, 0); }
  30% { box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.35); }
}
.highlight-flash { animation: highlight-flash-anim 1.6s ease-out; border-color: var(--gold) !important; }

/* ─── 월간 캘린더 ─── */
.month-wrap { min-width: 700px; }
.month-weekday-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 8px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 700;
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.month-cell {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 10px;
  padding: 8px;
  min-height: 92px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.month-cell:hover { border-color: var(--gold); }
.month-cell.today { border-color: var(--gold); background: var(--gold-glow); }
.month-cell.dim { opacity: 0.4; }
.month-cell-date { font-size: 12px; color: var(--text-dim); font-weight: 700; margin-bottom: 6px; }
.month-cell.today .month-cell-date { color: var(--gold-bright); }
.month-cell-chips { display: flex; flex-direction: column; gap: 3px; }
.month-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chip-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: var(--gold); }
.month-chip-time { color: var(--gold); font-weight: 700; flex-shrink: 0; }
.month-chip.closed .chip-dot { background: var(--red); }
.month-chip.ended { opacity: 0.5; }
.month-chip.ended .chip-dot { background: var(--text-dim); }
.month-chip-more { font-size: 10px; color: var(--text-dim); }

/* ─── Mobile ─── */
@media (max-width: 600px) {
  nav { padding: 0 16px; }
  nav .logo { font-size: 17px; }

  .tabs { padding: 0 16px; }
  .tab { padding: 12px 14px; font-size: 13px; }

  .content { padding: 16px; }

  .party-card { padding: 16px; }
  .raid-title { font-size: 16px; }

  .participants-row { flex-direction: column; gap: 12px; }

  .char-grid { grid-template-columns: 1fr; }

  .modal { max-width: 100%; margin: 0 12px; }
  .modal-body { padding: 18px; }
  .modal-footer { padding: 14px 18px; }

  .form-row { flex-direction: column; gap: 8px; }

  .party-actions { gap: 6px; }
  .party-actions .btn { font-size: 13px; padding: 7px 12px; }

  .create-btn-wrap { margin-bottom: 14px; }

  .party-toolbar-row { flex-wrap: wrap; }
  .party-register-btn { margin-left: 0; }
  .party-filter-bar .filter-search { margin-right: 0; width: 100%; }
  .party-filter-bar .filter-group { border-left: none; padding-left: 0; }
  .calendar-grid { grid-template-columns: repeat(7, minmax(130px, 1fr)); }

  .rank-header, .rank-row { font-size: 11px; padding: 8px 10px; }
  .dist-summary { flex-wrap: wrap; }
  .dist-box { min-width: 80px; padding: 12px 14px; }
}
