/* WEBRENEW-C — 야생의 땅: 듀랑고 분위기 공식 홈페이지 (청흑색+황금색).
 * 계약서 준수: 동작 요소 id·class(.badge/.big/.small/.danger/.ops-char/.dl-meta
 * .dl-file/#msg/#maint/확인창/서버 카드·운영 화면)는 이름 그대로 유지, 겉모양만 변경.
 * 외부 글꼴·CDN 없음 (시스템 글꼴만, CSP style-src/font-src 'self' 유지).
 * WEBFIX-1 .search-row 규칙 유지 (아래 "관리 화면" 절). */
:root {
  --bg: #0e181b;
  --bg-2: #152125;
  --bg-3: #1c2a2d;
  --inset: #0a1416;
  --paper: #f2f0e7;
  --muted: #b2bab5;
  --line: rgba(255, 255, 255, 0.13);
  --line-soft: rgba(255, 255, 255, 0.08);
  --gold: #edc67b;
  --gold-deep: #d99d4d;
  --gold-ink: #162021;
  --link: #f0d49a;
  --ok-bg: #14331c; --ok-line: #4caf50; --ok-text: #b9e6b9;
  --warn-bg: #3d2c07; --warn-line: #d9a441; --warn-text: #f2d894;
  --err-bg: #3d1414; --err-line: #e57373; --err-text: #f2b8b8;
  --info-line: #7fa8c9; --info-text: #cfe6f7;
  --radius: 10px;
  --max: 1120px;
  --header-h: 76px;
  --hero-focus-x: 50%;
  --hero-focus-y: 45%;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; padding: var(--header-h) 0 0;
  font-size: 17px; line-height: 1.7;
  font-family: -apple-system, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  letter-spacing: -0.01em;
  color: var(--paper);
  background: var(--bg);
}
::selection { background: var(--gold-deep); color: #111b1d; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
button:focus-visible, a.btn:focus-visible { outline-color: #fff; }
main { width: min(calc(100% - 40px), 680px); margin: 0 auto; padding: 36px 0 72px; }
main.wide { max-width: var(--max); }
section[id], h1[id] { scroll-margin-top: calc(var(--header-h) + 14px); }

h1.sign {
  margin: 64px 0 8px; padding-left: 14px;
  font-size: clamp(28px, 4vw, 40px); font-weight: 900; letter-spacing: -0.03em;
  border-left: 6px solid var(--gold);
}
h2 {
  margin: 0 0 12px; padding-left: 14px;
  font-size: clamp(25px, 3.4vw, 40px); font-weight: 900; letter-spacing: -0.03em;
  border-left: 6px solid var(--gold);
}
h3 { font-size: 20px; margin: 18px 0 6px; }
h4 { font-size: 18px; margin: 18px 0 6px; }
p { margin: 10px 0; }
a { color: var(--link); }
a:hover { color: #fff; }
section { margin: 0; }
#world, #server, #참여하기 { padding: 64px 0 8px; }
.section-lead { color: var(--muted); max-width: 700px; font-size: 18px; }
.note { color: var(--muted); font-size: 15px; }
a.note { text-underline-offset: 3px; }
code {
  background: var(--inset); border: 1px solid var(--line);
  padding: 1px 7px; border-radius: 6px;
  font-weight: 700; color: #ffd9a0; overflow-wrap: anywhere;
}

/* 카드 */
.card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin: 16px 0;
}
.big { font-size: 23px; font-weight: 900; }
.notice {
  background: var(--warn-bg); border: 2px solid var(--warn-line); border-radius: var(--radius);
  padding: 12px 14px; margin: 12px 0; font-weight: 700; color: var(--warn-text);
}
.ok-box {
  background: var(--ok-bg); border: 2px solid var(--ok-line); border-radius: var(--radius);
  padding: 12px 14px; margin: 12px 0; font-weight: 700; color: var(--ok-text);
}

/* 상단바: 고정·어두움 (높이 var(--header-h), 본문은 padding-top으로 밀림) */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
  background: rgba(11, 21, 24, 0.9);
  border-bottom: 1px solid var(--line);
}
.topbar.scrolled { background: #0b1518; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); }
.brand {
  display: inline-flex; align-items: center; gap: 10px; flex: none;
  color: var(--paper); text-decoration: none;
}
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong {
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 21px; font-weight: 700; letter-spacing: 0.12em;
}
.brand-text small { font-size: 8px; font-weight: 700; letter-spacing: 0.3em; color: var(--muted); margin-top: 4px; }
.main-nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.main-nav a { color: #dfe5df; font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.main-nav a:hover { color: var(--gold); }
.top-right {
  display: flex; align-items: center; gap: 10px; margin-left: auto;
  position: relative; min-width: 0;
}
.main-nav + .top-right { margin-left: 0; }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  background: var(--gold); color: var(--gold-ink);
  font-size: 14px; font-weight: 900; text-decoration: none;
  padding: 10px 16px;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.nav-cta:hover { background: #ffda92; color: var(--gold-ink); }
.nav-cta:focus-visible { outline: 3px solid #0e181b; outline-offset: -6px; }
#google-btn p.note { font-size: 14px; margin: 0; color: #ffe9c4; max-width: 230px; }

/* 프로필 배너 (실동작: 구글 버튼 대신 로그인 상태 표시 + 메뉴) */
#profile-btn {
  width: auto; margin: 0; padding: 5px 12px 5px 6px;
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.09); color: #ffe9c4;
  border: 2px solid rgba(255, 255, 255, 0.2); border-radius: 999px;
  font-size: 16px; font-weight: 700; box-shadow: none;
  max-width: 250px; cursor: pointer; font-family: inherit;
  clip-path: none;
}
#profile-btn:active { transform: none; }
#profile-img { width: 30px; height: 30px; border-radius: 50%; flex: none; }
.profile-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; min-width: 0; }
#profile-name { font-weight: 700; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-id { font-size: 14px; color: #ffd9a0; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#profile-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 10;
  display: flex; flex-direction: column; min-width: 190px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius);
}
#profile-menu a, #profile-menu button {
  display: block; width: 100%; margin: 0; padding: 12px 14px;
  font-size: 17px; font-weight: 700; color: var(--paper);
  background: none; border: none; border-radius: 0; box-shadow: none;
  text-decoration: none; text-align: left; cursor: pointer; font-family: inherit;
  clip-path: none;
}
#profile-menu a + a, #profile-menu a + button { border-top: 1px solid var(--line-soft); }
#profile-menu button#logout { color: var(--err-text); }

/* 히어로: 사진(있으면) + 아래 SVG 예비 겹 + 공통 왼쪽 어두운 그라디언트.
 * 사진 초점: --hero-focus-x/y (모바일은 오른쪽 풍경 쪽). */
.hero {
  position: relative; display: flex; align-items: center;
  min-height: 100svh; margin-top: calc(-1 * var(--header-h));
  overflow: hidden; background: var(--inset);
}
.hero-bg { position: absolute; inset: 0; }
.hero-svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; max-width: none;
}
.hero-photo { position: absolute; inset: -48px 0; display: block; will-change: transform; }
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover; max-width: none;
  object-position: var(--hero-focus-x) var(--hero-focus-y);
}
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 11, 13, 0.86) 0%, rgba(3, 11, 13, 0.55) 36%, rgba(3, 11, 13, 0.12) 64%, rgba(3, 11, 13, 0.05) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 24%),
    linear-gradient(180deg, rgba(3, 11, 13, 0.4) 0%, transparent 24%);
}
.hero-content {
  position: relative; z-index: 2;
  width: min(calc(100% - 40px), var(--max)); margin: 0 auto;
  padding: calc(var(--header-h) + 36px) 0 110px;
}
.hero-kicker {
  display: flex; align-items: center; gap: 12px;
  color: var(--gold); font-size: 13px; font-weight: 900; letter-spacing: 0.24em;
  margin: 0 0 18px;
}
.kicker-mark { width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); flex: none; }
.hero-content h1 {
  margin: 0 0 20px; max-width: 820px;
  font-size: clamp(38px, 5.6vw, 78px); line-height: 1.22; font-weight: 900; letter-spacing: -0.04em;
  text-shadow: 0 3px 30px rgba(0, 0, 0, 0.5);
}
.hero-content h1 em { font-style: normal; color: var(--gold); }
.hero-text { max-width: 620px; font-size: clamp(15px, 1.4vw, 18px); line-height: 1.85; color: #d7dbd4; }
.hero-ctas { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero-ctas .btn { width: auto; }
.hero-info {
  display: flex; gap: 22px; flex-wrap: wrap; align-items: center;
  margin: 30px 0 0; font-size: 13px; color: #e5e8e0;
}
.hero-info span { display: inline-flex; gap: 8px; align-items: center; }
.info-dot { width: 6px; height: 6px; background: var(--gold); border-radius: 50%; }
.hero-scroll {
  position: absolute; z-index: 2; left: max(20px, calc((100% - var(--max)) / 2)); bottom: 34px;
  display: flex; align-items: center; gap: 14px; margin: 0;
  font-size: 10px; letter-spacing: 0.2em; color: #dee2d9;
}
.hero-scroll::before { content: ""; height: 32px; width: 1px; background: #d3c9ad; }
.hero-index {
  position: absolute; z-index: 2; right: 36px; top: 50%; transform: translateY(-50%);
  writing-mode: vertical-rl; margin: 0;
  color: #f4e6c6; font-size: 10px; font-weight: 800; letter-spacing: 0.24em; opacity: 0.65;
}

/* 소개 카드 */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 30px; }
.feature { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; }
.feature-icon { width: 56px; height: 56px; }
.feature h3 { font-size: 21px; margin: 14px 0 6px; letter-spacing: -0.02em; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
.server-card { margin-top: 24px; }

/* 동작 메시지 (app.js showMsg 대상) */
#msg { margin-top: 16px; padding: 12px 14px; border-radius: var(--radius); display: none; font-weight: 700; }
#msg.show { display: block; }
#msg.ok { background: var(--ok-bg); border: 2px solid var(--ok-line); color: var(--ok-text); }
#msg.err { background: var(--err-bg); border: 2px solid var(--err-line); color: var(--err-text); }
#maint, #maint-main {
  background: var(--warn-bg); border: 2px solid var(--warn-line); border-radius: var(--radius);
  padding: 12px 14px; margin: 12px 0; font-weight: 700; color: var(--warn-text);
}

/* 뱃지 */
.badge { display: inline-block; font-size: 15px; font-weight: 900; padding: 3px 12px; border-radius: 999px; white-space: nowrap; }
.badge.pending { background: var(--warn-bg); border: 2px solid var(--warn-line); color: var(--warn-text); }
.badge.active, .badge.ok { background: var(--ok-bg); border: 2px solid var(--ok-line); color: var(--ok-text); }
.badge.suspended { background: var(--err-bg); border: 2px solid var(--err-line); color: var(--err-text); }
.badge.warn { background: var(--warn-bg); border: 2px solid var(--warn-line); color: var(--warn-text); }
.badge.work { background: #1d2a33; border: 2px solid var(--info-line); color: var(--info-text); }
.server-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 900; font-size: 19px; }
#server-badge { font-size: 17px; }

/* 가입 안내 폭 (넓은 홈에서도 읽기 좋게) */
#msg.show, .join-guide, #view-login .card, #view-maint, #view-none .card,
#view-pending .card, #view-active .card, #view-suspended .card {
  max-width: 660px; margin-left: auto; margin-right: auto;
}
.join-guide { margin-top: 32px; }
#google-btn-main { margin: 12px 0; }

/* 절차 안내: 번호 카드 */
.steps { margin: 14px 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  margin: 10px 0; padding: 12px 12px 12px 58px; position: relative;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  counter-increment: step; overflow-wrap: anywhere;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 12px; top: 12px;
  width: 34px; height: 40px; line-height: 40px; text-align: center;
  background: var(--gold); color: var(--gold-ink); font-weight: 900; font-size: 19px;
  border-radius: 50% 50% 46% 46%;
}
.steps li b { display: block; font-size: 18px; }
.steps-join li { padding-left: 70px; }
.steps-join li::before { content: none; }
.steps-join li img {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px;
}

/* 입력·버튼 */
label { display: block; margin: 14px 0 4px; font-weight: 700; }
input[type="text"], input[type="password"], input[type="search"], textarea, select {
  width: 100%; font-size: 18px; padding: 12px 14px; font-family: inherit;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--inset); color: var(--paper);
}
input:focus, textarea:focus, select:focus { outline: 3px solid var(--gold); border-color: var(--gold); }
button, a.btn {
  font-family: inherit; cursor: pointer;
  width: 100%; font-size: 19px; font-weight: 900; padding: 13px 20px; margin-top: 14px;
  background: var(--gold); color: var(--gold-ink);
  border: 1px solid #f3d59a; border-radius: var(--radius);
  text-decoration: none; text-align: center; display: inline-block;
}
button:hover, a.btn:hover { background: #ffda92; color: var(--gold-ink); }
button.secondary { background: transparent; color: var(--paper); border: 1px solid var(--line); }
button.secondary:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
button.small { width: auto; font-size: 16px; padding: 8px 18px; margin: 6px 8px 0 0; }
button.secondary.small { box-shadow: none; }
button.danger { background: transparent; color: var(--err-text); border: 1px solid var(--err-line); }
button.danger:hover { background: var(--err-bg); color: var(--err-text); }
button:disabled { opacity: 0.55; cursor: default; }
a.btn-big { display: block; font-size: 21px; padding: 16px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row button, .btn-row a.btn { flex: 1 1 0; width: auto; font-size: 17px; min-width: 120px; }
a.btn-primary {
  background: var(--gold); color: var(--gold-ink); border: 1px solid #ffdc99;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  border-radius: 0;
}
a.btn-primary:focus-visible { outline: 3px solid #0e181b; outline-offset: -6px; }
a.btn-secondary {
  background: rgba(9, 21, 22, 0.4); border: 1px solid rgba(245, 248, 238, 0.55); color: #fff;
  border-radius: 0;
}
a.btn-secondary:hover { background: rgba(245, 245, 235, 0.14); color: #fff; }
.hero-ctas .btn { min-height: 56px; display: inline-flex; align-items: center; gap: 16px; font-size: 16px; }
.arr { font-size: 20px; line-height: 1; font-weight: 400; }

/* 관리 화면 */
#server-card, #ops-section {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin: 16px 0;
}
#server-card h2, #ops-section h2 { margin-top: 0; }
#ctl-state.ok { color: var(--ok-text); }
#ctl-state.work { color: var(--gold); }
#ctl-state.warn { color: var(--warn-text); }
#ctl-result, #ops-result { margin-top: 12px; font-weight: 700; min-height: 1.6em; overflow-wrap: anywhere; }
#ctl-result.err, #ops-result.err { color: var(--err-text); }
#ctl-result.ok, #ops-result.ok { color: var(--ok-text); }
#ctl-backup { margin: 8px 0; }
#ctl-stuck, #ctl-crash { margin: 8px 0; }
.tabs { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.tabs button { margin-top: 0; }
ul.accounts { list-style: none; padding: 0; }
ul.accounts li {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin: 10px 0; overflow-wrap: anywhere;
}
ul.accounts .who { font-size: 20px; font-weight: 900; }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; min-width: 0; }
/* WEBFIX-1 (11/13): select가 width:100%라 같은 줄 수치 칸이 0으로 눌림 → select는 남는 폭만, 입력 칸 최소 폭 */
.search-row select { flex: 2 1 0; width: auto; min-width: 0; }
.search-row select + input { flex: 1 1 5.5em; min-width: 5.5em; }
.search-row button { width: auto; margin-top: 0; white-space: nowrap; flex: none; }
.server-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.server-grid div { background: var(--inset); border: 1px solid var(--line-soft); border-radius: 8px; padding: 8px 12px; }
.server-grid b { display: block; font-size: 14px; color: var(--muted); }
.server-grid span { font-size: 19px; font-weight: 900; }
ul.ops-audit { list-style: none; padding: 0; font-size: 16px; }
ul.ops-audit li {
  border: 1px solid var(--line-soft); border-radius: 8px;
  padding: 8px 12px; margin: 6px 0; background: var(--inset); overflow-wrap: anywhere;
}
#ops-found p { margin: 8px 0; }
label.ops-char {
  display: block; font-weight: 400; margin: 6px 0; padding: 10px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--inset);
}
label.ops-char input { width: 22px; height: 22px; vertical-align: middle; }

/* 확인 대화상자 */
#confirm, #ops-confirm {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.6); padding: 24px;
}
.confirm-box {
  background: var(--bg-3); color: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; max-width: 420px; width: 100%;
}
.confirm-box p { margin-top: 0; font-weight: 700; }
.warn-text { color: var(--err-text); }

/* 햄버거 메뉴 — 오른쪽 위 버튼 + 오른쪽 옆 메뉴 (키보드 열기·닫기·포커스 보임) */
#burger-btn {
  width: auto; flex: none; margin: 0; padding: 8px 14px;
  font-size: 22px; font-weight: 900; line-height: 1.2;
  background: rgba(255, 255, 255, 0.09); color: #ffe9c4;
  border: 2px solid rgba(255, 255, 255, 0.2); border-radius: 10px; box-shadow: none;
  clip-path: none;
}
#burger-btn:active { transform: none; }
#burger-overlay {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(0, 0, 0, 0.6);
}
#burger-nav {
  position: fixed; top: var(--header-h); right: 0; bottom: 0; z-index: 41;
  width: min(300px, 85vw); overflow-y: auto;
  background: var(--bg-3); border-left: 3px solid var(--gold);
  border-top: 1px solid var(--line);
  padding: 14px 0 24px;
}
#burger-nav .burger-title {
  margin: 0; padding: 6px 20px 12px;
  font-size: 19px; font-weight: 900; color: var(--gold);
}
#burger-nav a {
  display: block; padding: 13px 20px;
  font-size: 19px; font-weight: 700; color: var(--paper); text-decoration: none;
}
#burger-nav a + a { border-top: 1px solid var(--line-soft); }
#burger-nav a:hover { color: var(--gold); }
body.burger-open { overflow: hidden; }

/* 게임 참여하기 — PC·안드로이드 받기 카드 */
.dl-and { margin: 4px 0 20px; font-size: 18px; font-weight: 700; }
.dl-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.dl-card { margin: 0; min-width: 0; }
.dl-card h3 { font-size: 23px; margin: 8px 0 4px; }
.dl-icon img { display: block; width: 64px; height: 64px; }
.dl-meta { margin: 10px 0; }
.dl-meta .dl-file {
  background: var(--inset); border: 1px solid var(--line-soft);
  border-radius: 8px; padding: 10px 12px; margin: 8px 0;
}
.dl-meta .dl-file b { display: block; font-size: 17px; overflow-wrap: anywhere; }
.dl-meta .dl-file span { display: block; font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }
.dl-meta .dl-file code { font-size: 14px; }
.dl-card .steps li { font-size: 16px; }
.dl-card h4 { font-size: 18px; margin: 16px 0 6px; }

/* 바닥글 */
.footer { background: #091215; border-top: 1px solid var(--line); padding: 44px 0 30px; }
.footer-inner { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }
.brand-foot .brand-mark { width: 32px; height: 32px; }
.brand-foot .brand-text strong { font-size: 17px; }
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 18px; }
.footer-nav a { color: var(--muted); font-size: 15px; text-decoration: none; }
.footer-nav a:hover { color: var(--gold); }
.footer-copy { color: var(--muted); font-size: 13px; margin: 16px 0 0; }

/* 반응형: 1440·1024·768·390·360 — 가로 스크롤 0 */
@media (min-width: 800px) {
  .dl-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (max-width: 1099px) {
  .main-nav { display: none; }
  .hero-index { display: none; }
}
@media (max-width: 800px) {
  .feature-grid { grid-template-columns: 1fr; }
}
@media (max-width: 799px) {
  .nav-cta { display: none; }
}
@media (max-width: 768px) {
  :root { --hero-focus-x: 65%; --hero-focus-y: 50%; }
  .hero { min-height: 92svh; }
  .hero-content { padding-bottom: 90px; }
  .hero-shade {
    background:
      linear-gradient(90deg, rgba(3, 11, 13, 0.78) 0%, rgba(3, 11, 13, 0.35) 60%, rgba(3, 11, 13, 0.15) 100%),
      linear-gradient(0deg, var(--bg) 0%, transparent 26%),
      linear-gradient(180deg, rgba(3, 11, 13, 0.4) 0%, transparent 24%);
  }
}
@media (max-width: 640px) {
  :root { --header-h: 128px; }
  .topbar { flex-wrap: wrap; height: auto; min-height: 64px; padding: 8px 12px; row-gap: 2px; }
  #burger-btn { margin-left: auto; }
  .top-right { order: 2; flex: 1 1 100%; justify-content: flex-end; padding: 2px 0 6px; }
  #profile-name, .profile-id { max-width: 90px; }
  #profile-btn { max-width: 200px; }
  #world, #server, #참여하기 { padding-top: 48px; }
}
@media (max-width: 480px) {
  .search-row { flex-wrap: wrap; }
  .search-row > button { flex: 1 1 120px; }
  .search-row > label { min-width: 0; align-self: center; }
  body { font-size: 16px; }
  main { width: calc(100% - 32px); }
  .topbar { padding: 8px 10px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-text strong { font-size: 17px; letter-spacing: 0.08em; }
  .brand-text small { font-size: 7px; }
  .hero-content { width: calc(100% - 32px); }
  .hero-ctas .btn { flex: 1 1 100%; justify-content: center; }
  .hero-scroll { left: 16px; bottom: 24px; }
  .card { padding: 18px 16px; }
  .dl-meta .dl-file b { font-size: 16px; }
}
@media (max-width: 360px) {
  .brand-text strong { font-size: 15px; }
  .hero-content h1 { font-size: 34px; }
  .server-line { font-size: 17px; }
}

/* 움직임 줄이기 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-photo { transform: none !important; }
}
/* 섬 지도 편집 (MAPEDIT-1 D-27860) — 마름모 지도 캔버스 + 목록 */
#me-map {
  display: block; width: 100%; max-width: 640px; height: auto;
  border: 2px solid var(--line-soft); border-radius: 8px;
  touch-action: none; cursor: crosshair; background: #1a2233;
}
#me-add-param { flex: 1; min-width: 120px; }
@media (prefers-color-scheme: dark) {
  #me-map { border-color: #3d4c63; }
}
