/* ========================================
   EU연합 통합시스템 - 랜딩 페이지
   ======================================== */

.landing-body {
  background-image:
    radial-gradient(900px 500px at 50% -10%, rgba(0, 51, 153, 0.4) 0%, transparent 65%),
    radial-gradient(1200px 600px at 50% -20%, #1a2434 0%, #0c1015 60%);
}

.landing-hero {
  text-align: center;
  padding:
    calc(40px + var(--safe-top))
    calc(16px + var(--safe-right))
    32px
    calc(16px + var(--safe-left));
}

.eu-flag-bar.large {
  margin-bottom: 20px;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(0, 51, 153, 0.5), rgba(0, 51, 153, 0.2));
  border-width: 2px;
}

.eu-flag-svg.large {
  width: 60px;
  height: 40px;
}

.hero-title {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #FFCC00, #FFE680);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (min-width: 600px) {
  .hero-title { font-size: 40px; }
}

.hero-sub {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.3px;
}

.landing-main {
  max-width: 980px;
  margin: 0 auto;
  padding:
    0
    calc(16px + var(--safe-right))
    32px
    calc(16px + var(--safe-left));
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* 참전 문파 카드 */
.participating-card h2 { margin: 0 0 12px; font-size: 16px; }
.participating-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.participating-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.12s, background 0.12s, transform 0.05s;
}

.participating-pill:hover {
  border-color: var(--accent);
  background: var(--panel-3);
  transform: translateY(-1px);
}

.participating-fam { font-size: 11px; color: var(--muted); }

.participating-pct {
  font-size: 11px;
  color: var(--success);
  font-weight: 700;
  background: rgba(46, 160, 67, 0.15);
  padding: 1px 7px;
  border-radius: 999px;
}

/* Select prompt */
.select-prompt { text-align: center; margin: 8px 0 4px; }
.select-prompt h2 { margin: 0 0 4px; font-size: 18px; font-weight: 700; }
.select-prompt .hint { margin: 0; }

/* Family grid */
.family-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 720px) {
  .family-grid { grid-template-columns: 1fr 1fr; }
}

.family-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: border-color 0.15s, transform 0.05s;
}

.family-card.open { border-color: var(--accent); }
.family-card.is-leader { border-color: #FFCC00; }

.family-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}

.family-header:hover { background: var(--panel-2); }

.family-name {
  font-size: 16px;
  font-weight: 700;
}

.family-card.has-castle {
  border-color: rgba(255, 184, 74, 0.4);
  background: linear-gradient(180deg, rgba(255, 184, 74, 0.06) 0%, var(--panel) 60%);
}

.family-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.family-castle-line { display: flex; flex-wrap: wrap; gap: 6px; }

/* ===== 명예의 전당 (Hall of Fame) ===== */

.hof-card {
  background: linear-gradient(180deg, rgba(255, 204, 0, 0.04), var(--panel));
  border: 1px solid rgba(255, 204, 0, 0.20);
}

.hof-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.hof-hint {
  font-size: 11.5px;
  color: var(--muted);
}

.hof-tabs, .hof-period-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.hof-tab, .hof-period-tab {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.hof-tab:hover, .hof-period-tab:hover {
  background: var(--panel-3);
  color: var(--text);
}

.hof-tab.active {
  background: linear-gradient(135deg, #FFCC00, #FFAA00);
  border-color: rgba(255, 204, 0, 0.7);
  color: #1c1300;
  box-shadow: 0 1px 4px rgba(255, 204, 0, 0.3);
}

.hof-period-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0d12;
}

.hof-archive-select {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
}

.hof-arch-label {
  color: var(--muted);
  font-weight: 600;
}

.hof-archive-select select {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}

.hof-range {
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.hof-body {
  overflow-x: auto;
}

.hof-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.hof-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.hof-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(110, 118, 129, 0.12);
  vertical-align: middle;
}

.hof-table .num {
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.hof-table td.accent {
  color: #FFCC00;
  font-weight: 800;
}

.hof-table td.muted {
  color: var(--muted);
}

.hof-table .rank {
  width: 38px;
  text-align: center;
  font-weight: 700;
}

.hof-table tr.rank-1 {
  background: linear-gradient(90deg, rgba(255, 204, 0, 0.18), transparent);
}

.hof-table tr.rank-2 {
  background: linear-gradient(90deg, rgba(192, 192, 192, 0.13), transparent);
}

.hof-table tr.rank-3 {
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.13), transparent);
}

.hof-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.hof-table tr.is-me {
  background: linear-gradient(90deg, rgba(46, 160, 67, 0.22), rgba(46, 160, 67, 0.06));
  border-left: 3px solid #69d586;
  box-shadow: inset 0 0 0 1px rgba(105, 213, 134, 0.25);
}

.hof-table tr.is-me td:first-child { padding-left: 7px; }

.me-tag {
  display: inline-block;
  background: #2ea043;
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 4px;
  vertical-align: middle;
}

.elite-mini {
  font-size: 13px;
}

@media (max-width: 480px) {
  .hof-tab, .hof-period-tab { padding: 5px 10px; font-size: 12px; }
  .hof-table { font-size: 12px; }
  .hof-table th, .hof-table td { padding: 6px 6px; }
}

.family-castle-badge {
  display: inline-block;
  padding: 2px 9px;
  background: linear-gradient(135deg, rgba(255, 184, 74, 0.18), rgba(255, 126, 60, 0.14));
  border: 1px solid rgba(255, 184, 74, 0.45);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.family-leader-badge {
  display: inline-block;
  padding: 2px 10px;
  background: linear-gradient(135deg, rgba(255, 204, 0, 0.28), rgba(255, 170, 0, 0.18));
  border: 1px solid rgba(255, 204, 0, 0.65);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #FFCC00;
  letter-spacing: 0.2px;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.castle-lord-badge {
  display: inline-block;
  padding: 2px 6px;
  background: linear-gradient(135deg, #ffb84a, #ff7e3c);
  color: #2a1900;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: 0 1px 3px rgba(255, 126, 60, 0.35);
  white-space: nowrap;
}

.leader-badge {
  display: inline-block;
  padding: 2px 7px;
  background: linear-gradient(135deg, #FFE066, #FFCC00 60%, #FFAA00);
  color: #2a1900;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2px;
  box-shadow: 0 1px 4px rgba(255, 204, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  white-space: nowrap;
}

.guild-card.is-castle-lord {
  background: linear-gradient(135deg, rgba(255, 184, 74, 0.16), rgba(0, 51, 153, 0.06));
  border-color: rgba(255, 184, 74, 0.55);
}

/* 원형 progress 가 있는 새 카드 레이아웃 */
.guild-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.guild-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  text-align: left;
  min-width: 0;
}

.guild-ring {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.ring-bg {
  fill: none;
  stroke: var(--panel-3);
  stroke-width: 3.5;
}

.ring-fg {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.ring-text {
  fill: var(--text);
  font-size: 10px;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* 카드 호버 시 ring 살짝 회전 */
.guild-card:hover .guild-ring { transform: rotate(10deg); transition: transform 0.3s; }

.family-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.family-pct {
  background: var(--panel-2);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.family-arrow {
  transition: transform 0.2s;
  font-size: 14px;
  color: var(--muted);
}

.family-card.open .family-arrow { transform: rotate(180deg); }

.guild-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
  padding: 0 14px 14px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.family-card.open .guild-list {
  max-height: 1000px;
}

.guild-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 8px 10px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, transform 0.06s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  -webkit-tap-highlight-color: transparent;
  min-height: 130px;
}

.guild-card:hover {
  border-color: var(--accent);
  background: var(--panel-3);
}

.guild-card:active { transform: scale(0.97); }

.guild-card.is-leader {
  background: linear-gradient(180deg, rgba(255, 204, 0, 0.14), rgba(0, 51, 153, 0.06));
  border-color: rgba(255, 204, 0, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 204, 0, 0.15), 0 2px 10px rgba(255, 204, 0, 0.12);
}

.guild-name {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.2px;
  line-height: 1.2;
  word-break: keep-all;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}


.ring-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guild-ring {
  width: 56px;
  height: 56px;
  position: absolute;
  inset: 0;
}

.ring-pct {
  position: relative;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 800;
  font-size: 13px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.ring-pct small { font-size: 9px; font-weight: 700; margin-left: 1px; opacity: 0.7; }

.guild-meta {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.2px;
}

.castle-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: center;
  margin-top: 2px;
}

/* ===== 성주 현황 ===== */
.castle-lords-card { padding: 18px 20px; }
.castle-lords-card h2 { margin: 0 0 14px; font-size: 16px; }

.castle-lord-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 720px) {
  .castle-lord-grid { grid-template-columns: repeat(4, 1fr); }
}

.castle-lord-cell {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: center;
}

.cl-castle {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}

.cl-lord {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.cl-lord.empty { color: var(--muted-2); font-weight: 500; font-style: italic; font-size: 13px; }

.cl-lord-family { font-size: 11px; color: var(--muted); font-weight: 500; margin-top: 3px; }

/* ===== 성주 변동 이력 ===== */

.castle-history {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.castle-history > summary {
  cursor: pointer;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
  list-style: none;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.12s, color 0.12s;
}

.castle-history > summary::-webkit-details-marker { display: none; }
.castle-history > summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s;
  transform: rotate(0);
}
.castle-history[open] > summary::before { transform: rotate(90deg); }
.castle-history > summary:hover { background: var(--panel-2); color: var(--text); }

.castle-history-body { margin-top: 10px; }

.castle-history-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 720px) {
  .castle-history-grid { grid-template-columns: repeat(4, 1fr); }
}

.ch-column {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}

.ch-castle-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  margin-bottom: 6px;
}

.ch-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.ch-list li {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 3px 0;
  color: var(--text);
}

.ch-list li.empty { color: var(--muted); font-style: italic; }

.ch-list li.current {
  color: var(--accent);
  font-weight: 700;
}

.ch-list li.current .ch-guild::after {
  content: " ◄";
  color: var(--accent);
  font-size: 9px;
  vertical-align: middle;
}

.ch-date { color: var(--muted); font-size: 11px; min-width: 38px; }
.ch-guild { font-weight: 600; text-align: right; }

/* ===== 모집중 배지 / 정보 버튼 ===== */

.recruiting-badge {
  display: inline-block;
  padding: 2px 7px;
  background: linear-gradient(135deg, #69d586, #2ea043);
  color: #062313;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2px;
  box-shadow: 0 1px 4px rgba(46, 160, 67, 0.45);
  white-space: nowrap;
  animation: recruit-pulse 2s ease-in-out infinite;
}

@keyframes recruit-pulse {
  0%, 100% { box-shadow: 0 1px 4px rgba(46, 160, 67, 0.45); }
  50%      { box-shadow: 0 1px 10px rgba(46, 160, 67, 0.75); }
}

.guild-card.is-recruiting {
  border-color: rgba(46, 160, 67, 0.55);
  background: linear-gradient(180deg, rgba(46, 160, 67, 0.1), rgba(0, 51, 153, 0.05));
}

.guild-card { position: relative; }

.guild-info-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  color: var(--muted);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
  opacity: 0.6;
  transition: opacity 0.12s, background 0.12s, transform 0.12s;
}

.guild-info-btn:hover {
  opacity: 1;
  background: var(--accent);
  color: #1a0d00;
  transform: scale(1.1);
}

/* ===== 문파 정보 모달 ===== */

.guild-info-dialog {
  max-width: 480px;
  width: 92%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
}

.guild-info-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.gid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
}

.gid-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--accent);
}

.gid-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  transition: background 0.12s;
}

.gid-close:hover { background: var(--panel-2); color: var(--text); }

.gid-body { padding: 14px 18px 18px; }

.gid-status {
  font-size: 13px;
  margin-bottom: 12px;
  text-align: center;
  padding: 8px;
  border-radius: 8px;
}

.gid-status.open {
  background: linear-gradient(135deg, rgba(46, 160, 67, 0.18), rgba(105, 213, 134, 0.10));
  color: #69d586;
  border: 1px solid rgba(46, 160, 67, 0.45);
}

.gid-status.closed {
  background: var(--panel-2);
  color: var(--muted);
  font-style: italic;
}

.gid-section { margin-bottom: 14px; }

.gid-label {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 4px;
}

.gid-content {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.55;
  background: var(--panel-2);
  border-radius: 8px;
  padding: 10px 12px;
  word-break: break-word;
}

.gid-discord-btn {
  display: block;
  text-align: center;
  background: #5865F2;
  color: #fff;
  text-decoration: none;
  padding: 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  transition: filter 0.12s;
}

.gid-discord-btn:hover { filter: brightness(1.12); }

.gid-empty {
  text-align: center;
  padding: 14px;
  background: var(--panel-2);
  border-radius: 8px;
  margin-bottom: 12px;
}

.gid-empty p { margin: 4px 0; font-size: 13px; }

.gid-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.gid-actions a.primary {
  flex: 1;
  text-align: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1c1300;
  text-decoration: none;
  padding: 10px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 14px;
}

.gid-updated {
  font-size: 10.5px;
  color: var(--muted);
  text-align: right;
  margin-top: 10px;
}

/* ===== 거래소 시세 위젯 ===== */

.trade-market-card > summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  list-style: none;
  padding: 6px 0;
  transition: color 0.12s;
}

.trade-market-card > summary::-webkit-details-marker { display: none; }
.trade-market-card > summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s;
  color: var(--muted);
}
.trade-market-card[open] > summary::before { transform: rotate(90deg); }
.trade-market-card > summary:hover { color: var(--accent); }

.tm-body { margin-top: 12px; }

.tm-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  color: var(--muted);
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 4px;
}

.tm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.tm-table th {
  text-align: left;
  padding: 6px 8px;
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.tm-table th.num { text-align: right; }

.tm-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(110, 118, 129, 0.10);
  vertical-align: middle;
}

.tm-table td.num { text-align: right; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.tm-table td.num small { color: var(--muted); margin-left: 2px; }

.tm-table td.sell { color: #69d586; font-weight: 700; }
.tm-table td.buy { color: #6fb5ff; font-weight: 700; }
.tm-table td.muted { color: var(--muted); }

.tm-table .tm-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tm-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.tm-table tr:hover { background: rgba(255, 255, 255, 0.02); }

.tm-footer {
  margin-top: 10px;
  text-align: right;
  font-size: 11px;
}

.tm-footer a {
  color: var(--muted);
  text-decoration: none;
}
.tm-footer a:hover { color: var(--accent); }

.lord-guild { display: inline-block; }
.lord-guild.in-alliance {
  color: var(--accent);
  padding: 2px 8px;
  background: rgba(255, 184, 74, 0.12);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}
.lord-guild.outsider {
  color: var(--muted);
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

/* ===== 연합 지침 ===== */
.guidelines-card { padding: 0; overflow: hidden; }

.guidelines-card summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.guidelines-card summary::-webkit-details-marker { display: none; }

.guidelines-card summary::after {
  content: "▼";
  font-size: 12px;
  color: var(--muted);
  transition: transform 0.2s;
}

.guidelines-card[open] summary::after { transform: rotate(180deg); }

.guidelines-card summary:hover { background: var(--panel-2); }

.guidelines-content {
  padding: 0 20px 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.guidelines-content .hint { color: var(--muted); font-style: italic; }

.guidelines-updated {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

/* ===== Responsive: tablet (≤900px) ===== */
@media (max-width: 900px) {
  .hero-title { font-size: 30px; }
  .eu-flag-svg.large { width: 52px; height: 35px; }
}

/* ===== Responsive: mobile (≤640px) ===== */
@media (max-width: 640px) {
  .landing-hero {
    padding-top: calc(28px + var(--safe-top));
    padding-bottom: 22px;
  }
  .hero-title { font-size: 26px; letter-spacing: -0.4px; }
  .hero-sub { font-size: 13px; }
  .eu-flag-bar.large { padding: 8px 14px; margin-bottom: 14px; }
  .eu-flag-svg.large { width: 46px; height: 31px; }

  .landing-main { gap: 14px; padding-bottom: 24px; }

  .participating-card,
  .castle-lords-card { padding: 14px 16px; }
  .participating-card h2,
  .castle-lords-card h2 { font-size: 15px; margin-bottom: 10px; }

  .castle-lord-grid { gap: 8px; }
  .castle-lord-cell { padding: 9px 8px; }
  .cl-castle { font-size: 12px; }
  .cl-lord { font-size: 13px; }
  .cl-lord.empty { font-size: 12px; }
  .lord-guild.in-alliance,
  .lord-guild.outsider { font-size: 12px; padding: 2px 7px; }

  .family-header { padding: 12px 14px; }
  .family-name { font-size: 15px; }
  .family-stats { font-size: 11px; gap: 8px; }
  .family-pct { font-size: 11px; padding: 2px 7px; }

  .guild-list {
    grid-template-columns: repeat(auto-fill, minmax(102px, 1fr));
    gap: 7px;
    padding: 0 10px 12px;
  }
  .guild-card { min-height: 118px; padding: 10px 6px 8px; }
  .guild-name { font-size: 12.5px; }
  .ring-wrap { width: 50px; height: 50px; }
  .guild-ring { width: 50px; height: 50px; }
  .ring-pct { font-size: 12px; }
  .guild-meta { font-size: 10.5px; }

  .select-prompt h2 { font-size: 16px; }
  .select-prompt .hint { font-size: 12.5px; }

  .guidelines-card summary { padding: 12px 16px; font-size: 14px; }
  .guidelines-content { padding: 0 16px 16px; font-size: 13.5px; }
}

/* ===== Responsive: small mobile (≤380px) ===== */
@media (max-width: 380px) {
  .hero-title { font-size: 23px; }
  .hero-sub { font-size: 12px; }
  .castle-lord-grid { grid-template-columns: 1fr 1fr; }
  .guild-list { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .guild-card { min-height: 110px; }
  .guild-name { font-size: 12px; }
}
