/* 대륙의 전설 - 3D 오픈월드 꾸미기 (이모티콘 없음) */
* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 12px 10px 36px;
  font-family: "Segoe UI", sans-serif;
  color: #f2f6ff;
  background: linear-gradient(#0d1730, #070d1e 60%, #04070f);
  text-align: center;
  min-height: 100vh;
}

h1 {
  font-size: 40px; margin: 6px 0;
  letter-spacing: 4px; color: #ffd34d;
  text-shadow: 0 0 18px #ff9a1f, 0 4px 0 #4a2b00;
}
.설명 { font-size: 17px; color: #9fd4ff; margin: 0 0 10px; }

.돌아가기 {
  display: inline-block; background: #13224a; color: #9fd4ff;
  border: 3px solid #4d8dff; border-radius: 999px;
  padding: 7px 16px; font-size: 16px; font-weight: bold; text-decoration: none;
}

/* ===== 3D 화면 ===== */
.화면칸 {
  position: relative; display: inline-block; max-width: 100%;
}
#화면 {
  display: block; max-width: 100%;
  border: 6px solid #4d8dff; border-radius: 14px;
  background: #0a1430; cursor: crosshair;
}
#미니지도 {
  position: absolute; right: 12px; bottom: 60px;
  border: 4px solid #ffd34d; border-radius: 8px;
  background: #000; opacity: .92;
}

.조준점 {
  position: absolute; left: 50%; top: 50%;
  width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border: 2px solid #ffffffaa; border-radius: 50%;
  pointer-events: none;
}

/* HUD */
.hud왼쪽 {
  position: absolute; left: 14px; top: 12px;
  text-align: left; pointer-events: none;
}
.바줄 { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; font-size: 14px; font-weight: bold; }
.바이름 { width: 34px; color: #cfe0ff; }
.긴바 {
  width: 160px; height: 14px;
  background: #00000088; border: 2px solid #ffffff55; border-radius: 999px; overflow: hidden;
}
.긴바 span { display: block; height: 100%; width: 100%; transition: width .15s; }
.빨간바 { background: linear-gradient(90deg, #ff2f4a, #ff8a6b); }
.파란바 { background: linear-gradient(90deg, #2f7dff, #6bd4ff); }
.노란바 { background: linear-gradient(90deg, #ffb020, #ffe86b); }

.hud오른쪽 {
  position: absolute; right: 14px; top: 12px;
  text-align: right; font-size: 16px; font-weight: bold;
  color: #ffd34d; text-shadow: 0 2px 4px #000; pointer-events: none;
}
.hud오른쪽 div { margin-bottom: 3px; }

.hud아래 {
  position: absolute; left: 0; right: 0; bottom: 8px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  font-size: 13px; pointer-events: none;
}
.hud아래 span {
  background: #00000099; border: 2px solid #4d8dff;
  border-radius: 8px; padding: 3px 8px; font-weight: bold;
}
.hud아래 b { color: #ffd34d; }

.안내 {
  position: absolute; left: 50%; top: 62%;
  transform: translateX(-50%);
  background: #000000bb; border: 3px solid #ffd34d; border-radius: 10px;
  padding: 7px 16px; font-size: 17px; font-weight: bold; color: #ffd34d;
  white-space: nowrap; display: none;
}
.안내.보임 { display: block; }

/* 떠오르는 피해 숫자 */
.띄움글판 { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.띄움글 {
  position: absolute; font-size: 22px; font-weight: bold;
  text-shadow: 0 2px 4px #000;
  animation: 떠오름 .9s ease-out forwards;
}
@keyframes 떠오름 {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-50px); opacity: 0; }
}

/* 조작 안내 */
.조작안내 {
  margin: 8px auto; max-width: 720px;
  font-size: 15px; color: #9fd4ff;
}
.조작안내 b { color: #ffd34d; }

/* 터치 버튼 */
.터치판 { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 8px 0; }
.터치 {
  font-size: 15px; font-weight: bold;
  min-width: 74px; height: 44px;
  border: 3px solid #fff; border-radius: 10px;
  background: linear-gradient(#4d8dff, #1c47a8);
  color: #fff; cursor: pointer; box-shadow: 0 4px 0 #0d2a66;
}
.터치:active { transform: translateY(3px); box-shadow: 0 1px 0 #0d2a66; }
.터치.공격색 { background: linear-gradient(#ff8a2a, #b33c00); box-shadow: 0 4px 0 #6b2300; }
.터치.특기색 { background: linear-gradient(#c46bff, #6b1aa8); box-shadow: 0 4px 0 #3d0a63; }

/* ===== 전직 창 ===== */
.전직창 {
  max-width: 620px;
  border-color: #c46bff;
  box-shadow: 0 0 60px #c46bff88;
}
.전직제목 {
  font-size: 34px; letter-spacing: 4px;
  color: #ffd34d;
  text-shadow: 0 0 22px #ff9a1f;
  animation: 반짝임 1.4s infinite alternate;
}
@keyframes 반짝임 {
  from { text-shadow: 0 0 14px #ff9a1f; }
  to   { text-shadow: 0 0 34px #ffd34d, 0 0 60px #ff5a3c; }
}
.직업칸 {
  display: block; width: 100%;
  background: rgba(255,255,255,.07);
  border: 4px solid; border-radius: 14px;
  padding: 12px 14px; margin-bottom: 8px;
  text-align: left; cursor: pointer; color: #f2f6ff;
}
.직업칸:hover { background: rgba(255,255,255,.16); transform: scale(1.02); }
.직업칸 .직업이름 { font-size: 23px; font-weight: bold; letter-spacing: 2px; }
.직업칸 .직업한줄 { font-size: 15px; color: #ffd34d; margin: 2px 0 6px; }
.직업칸 .직업설명 { font-size: 14px; color: #cfe0ff; }
.직업칸 .직업수치 {
  font-size: 14px; font-weight: bold; color: #5aff8a; margin-top: 5px;
}
.직업칸 .직업특기 {
  font-size: 14px; margin-top: 5px; color: #8ce8ff;
}
#직업글 { font-size: 18px; letter-spacing: 2px; }

/* 기록 */
.기록 {
  max-width: 720px; margin: 8px auto;
  background: rgba(0,0,0,.45);
  border: 3px solid #4d8dff; border-radius: 12px;
  padding: 9px; height: 96px; overflow-y: auto;
  text-align: left; font-size: 15px; line-height: 1.55;
}
.기록 p { margin: 0 0 2px; }
.기록 .금색 { color: #ffd34d; font-weight: bold; }
.기록 .빨강 { color: #ff8a9a; }
.기록 .파랑 { color: #8ce8ff; }

/* 창 */
.막 {
  position: fixed; inset: 0; background: rgba(0,0,0,.82);
  display: flex; align-items: center; justify-content: center;
  z-index: 60; padding: 14px;
}
.막.숨김 { display: none; }
.창 {
  background: linear-gradient(#172a55, #0a1430);
  border: 6px solid #ffd34d; border-radius: 20px;
  padding: 18px; max-width: 540px; width: 100%;
  max-height: 88vh; overflow-y: auto;
}
.창 h2 { font-size: 27px; margin: 0 0 8px; color: #ffd34d; }
.알림 { font-size: 17px; color: #ffd34d; min-height: 40px; }

.명령 {
  font-size: 17px; font-weight: bold; padding: 10px 15px;
  border: 4px solid #fff; border-radius: 12px;
  background: linear-gradient(#ff9a1f, #b85c00);
  color: #fff; cursor: pointer; box-shadow: 0 5px 0 #6b3500;
}
.명령.닫기 {
  background: linear-gradient(#8ca0b5, #495a6b);
  box-shadow: 0 5px 0 #26323d; margin-top: 10px;
}

.탭줄 { display: flex; justify-content: center; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.탭 {
  font-size: 16px; font-weight: bold; padding: 7px 14px;
  border: 3px solid #ffd34d; border-radius: 10px;
  background: #13224a; color: #ffd34d; cursor: pointer;
}
.탭.켜짐 { background: #ffd34d; color: #13224a; }

.목록 { display: grid; gap: 6px; }
.물건 {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: rgba(255,255,255,.08);
  border: 3px solid #4d8dff; border-radius: 10px;
  padding: 8px 12px; font-size: 15px; font-weight: bold;
  color: #f2f6ff; cursor: pointer; text-align: left;
}
.물건:active { transform: scale(.97); }
.물건.낀것 { background: rgba(255,211,77,.18); }
.물건 small { display: block; font-weight: normal; color: #9fd4ff; }

/* 기술 칸 (화면 왼쪽 아래) */
.기술칸 {
  position: absolute; left: 14px; bottom: 44px;
  display: flex; gap: 6px; pointer-events: none;
}
.기술 {
  background: #000000aa; border: 3px solid #4d8dff;
  border-radius: 10px; padding: 4px 9px;
  font-size: 13px; font-weight: bold; text-align: center;
  min-width: 68px;
}
.기술 .키 { display: block; font-size: 17px; color: #ffd34d; }
.기술 .마 { display: block; font-size: 11px; color: #8ce8ff; font-weight: normal; }
.기술.못씀 { opacity: .4; }

/* 전직 창 */
.전직창 { border-color: #ff6b3a; max-width: 620px; }
.전직제목 {
  color: #ff9a1f !important;
  text-shadow: 0 0 20px #ff6b3a;
  letter-spacing: 4px;
}
.직업카드 {
  display: block; width: 100%; text-align: left;
  background: rgba(255,255,255,.07);
  border: 4px solid #666; border-radius: 14px;
  padding: 11px 14px; cursor: pointer; color: #f2f6ff;
  margin-bottom: 4px;
}
.직업카드:hover { background: rgba(255,255,255,.16); transform: scale(1.02); }
.직업카드 h3 { margin: 0 0 3px; font-size: 22px; letter-spacing: 2px; }
.직업카드 p { margin: 0 0 6px; font-size: 14px; color: #cfe0ff; }
.직업카드 .능력 { font-size: 13px; color: #9fd4ff; }
.직업카드 .기술줄 { font-size: 13px; color: #ffd34d; margin-top: 4px; }

.터치.특기색 {
  background: linear-gradient(#b95cff, #5c1f9e);
  box-shadow: 0 4px 0 #35105e;
}

.등급머리 {
  margin: 12px 0 2px; padding: 5px 10px;
  font-size: 17px; font-weight: bold; letter-spacing: 2px;
  border-left: 6px solid; text-align: left;
}

/* ===== 시작 화면 (스토리 + 직업) ===== */
.시작막 { background: rgba(3,6,16,.96); z-index: 90; }
.시작창 { max-width: 660px; border-color: #ff9a1f; }
.큰제목 {
  font-size: 44px; letter-spacing: 6px; margin: 0 0 14px;
  color: #ffd34d; text-shadow: 0 0 22px #ff9a1f, 0 4px 0 #4a2b00;
}
.작은제목 { font-size: 22px; color: #9fd4ff; margin: 14px 0 8px; }

.이야기칸 {
  background: rgba(0,0,0,.45);
  border: 3px solid #4d8dff; border-radius: 14px;
  padding: 16px; min-height: 150px;
  display: flex; align-items: center; gap: 14px;
}
.이야기칸 .말칸 { flex: 1; text-align: left; }
.이야기칸 p {
  font-size: 21px; line-height: 1.7; margin: 0; color: #f2f6ff;
}
.이야기칸.숨김, .직업칸.숨김, .명령.숨김 { display: none; }

/* 캐릭터 얼굴 */
.얼굴 {
  display: block; flex: none;
  background: rgba(255,255,255,.07);
  border: 4px solid #ffd34d; border-radius: 16px;
}
.이름표 {
  display: inline-block; font-size: 17px; font-weight: bold;
  background: #ffd34d; color: #13224a;
  padding: 3px 14px; border-radius: 999px;
  margin-bottom: 8px; letter-spacing: 2px;
}

.직업목록 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px; margin-bottom: 8px;
}
.직업카드 {
  background: rgba(255,255,255,.07);
  border: 4px solid #4d8dff; border-radius: 14px;
  padding: 12px 8px; cursor: pointer; color: #f2f6ff;
  font-size: 17px; font-weight: bold;
  transition: transform .12s;
}
.직업카드:hover { transform: translateY(-4px); }
.직업카드.고름 { background: rgba(255,211,77,.2); border-color: #ffd34d; transform: translateY(-4px); }
.직업카드 canvas { display: block; margin: 0 auto 6px; }
.직업카드 small { display: block; font-weight: normal; font-size: 13px; color: #9fd4ff; margin-top: 4px; }

/* 필드 스토리 화면 */
.필드막 { background: rgba(3,6,16,.93); z-index: 80; cursor: pointer; }
.필드안 {
  max-width: 700px; width: 100%;
  border-top: 4px solid #ffd34d; border-bottom: 4px solid #ffd34d;
  padding: 26px 20px 38px; position: relative;
}
.필드안 .얼굴 { margin: 0 auto 10px; }
.필드안 p {
  font-size: 30px; line-height: 1.6; margin: 0;
  text-shadow: 0 3px 10px #000;
}
/* "뿅!" 같은 효과음 줄 */
.필드안 p.효과음 {
  font-size: 58px; font-weight: bold; letter-spacing: 6px;
  color: #ffd34d; text-shadow: 0 0 30px #ff9a1f, 0 5px 0 #4a2b00;
  animation: 뿅튀기 .45s ease-out;
}
@keyframes 뿅튀기 {
  0% { transform: scale(.2); opacity: 0; }
  60% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(1); }
}

.필드안내 {
  position: absolute; left: 0; right: 0; bottom: 8px;
  font-size: 15px; color: #9fd4ff; animation: 반짝깜박 1s infinite;
}
@keyframes 반짝깜박 { 0%,100% { opacity: 1; } 50% { opacity: .2; } }

/* 시작 화면 직업 단추 */
.직업단추 {
  background: rgba(255,255,255,.07);
  border: 4px solid #4d8dff; border-radius: 14px;
  padding: 14px 8px; cursor: pointer; color: #f2f6ff;
  transition: transform .12s;
}
.직업단추:hover { transform: translateY(-4px); }
.직업단추.고름 { background: rgba(255,211,77,.22); transform: translateY(-4px); }
.직업단추 b { display: block; font-size: 21px; letter-spacing: 2px; }
.직업단추 small { display: block; font-size: 13px; color: #9fd4ff; margin-top: 5px; }

/* 기술 상자 (화면 왼쪽 아래) */
.기술상자 {
  position: relative; overflow: hidden;
  background: #000000aa; border: 3px solid #4d8dff;
  border-radius: 10px; padding: 4px 9px;
  font-size: 13px; text-align: center; min-width: 72px;
}
.기술상자 b { display: block; font-size: 18px; color: #ffd34d; }
.기술상자 span { display: block; font-size: 13px; font-weight: bold; }
.기술상자 i { display: block; font-size: 11px; color: #8ce8ff; font-style: normal; }
.쿨덮개 {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 0%;
  background: rgba(0,0,0,.7);
}

.아래줄 { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.작은버튼 {
  font-size: 16px; font-weight: bold; padding: 8px 16px;
  border: 3px solid #fff; border-radius: 12px;
  background: linear-gradient(#ff5a6e, #a3101f); color: #fff; cursor: pointer;
}
