/* 말꼬리 2026 — "경마장의 맑은 날" : 잔디 초록 · 하늘 · 흰 펜스 · 주황 경기 강조 (theme/malggoli2)
   - 글꼴: 제목·숫자 Black Han Sans, 본문 Pretendard
   - 앱(새 앱 26.x) 안에서는 body.is-app — 웹 머리·꼬리 숨김, 여백은 앱이 넣는 --app-top/--app-bottom (INIT-WEBVIEW §7)
   - 그누보드 기본 스킨(default.css/mobile.css) 위에 얹는다 */

:root {
  --turf: #1e7b3c;       /* 브랜드 잔디 */
  --turf-deep: #0f4d25;
  --turf-soft: #e6f4ea;
  --sky: #3fa7e0;
  --sky-soft: #e3f3fb;
  --sun: #ffc233;        /* 노랑 */
  --run: #ff7a1a;        /* 주황 — 행동·숫자 강조 */
  --run-deep: #e05f00;
  --cream: #fffaf1;
  --sand: #f2e6d3;
  --ink: #17251c;
  --muted: #5c6b61;
  --line: rgba(23, 37, 28, .10);
  --card: #ffffff;
  --bg: #f6faf4;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(15, 77, 37, .10);
  --display: 'Black Han Sans', 'Pretendard Variable', Pretendard, sans-serif;
  --body: 'Pretendard Variable', Pretendard, -apple-system, 'Malgun Gothic', sans-serif;
}

html { background: var(--bg); }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; word-break: keep-all; }
h1, h2, h3, h4, h5, h6, input, button, textarea, select { font-family: var(--body); }
a { color: inherit; }
img { max-width: 100%; }
#hd, #wrapper, #ft { min-width: 0; }
#hd_login_msg { display: none; }

/* ---------- 레이아웃 ---------- */
.m-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
.m-page { padding-top: var(--app-top, 0px); padding-bottom: var(--app-bottom, 0px); }
.fade-in { animation: mFadeIn .6s ease both; }
@keyframes mFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 게시판·회원 등 그누보드 화면 틀 */
#wrapper { background: transparent; }
#container_wr { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
#container { float: none; width: auto; margin: 28px 0 56px; min-height: 360px; }
#container_title { display: none; }

/* ---------- 머리 ---------- */
.m-hd { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.m-hd__in { display: flex; align-items: center; gap: 20px; height: 68px; }
.m-hd__logo img { height: 40px; width: auto; display: block; }
.m-hd__nav { display: flex; gap: 4px; margin-left: 12px; flex: 1; }
.m-hd__nav a { padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 700; color: var(--ink); font-size: 15px; }
.m-hd__nav a:hover, .m-hd__nav a.is-on { background: var(--turf-soft); color: var(--turf); }
.m-hd__right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.m-hd__user { font-size: 14px; color: var(--muted); text-decoration: none; }
.m-hd__user b { color: var(--turf); }
.m-hd__burger { display: none; width: 42px; height: 42px; border: 0; border-radius: 12px; background: var(--turf-soft); color: var(--turf); font-size: 20px; cursor: pointer; }
.m-langs { display: flex; gap: 4px; font-size: 12px; }
.m-langs a { text-decoration: none; color: var(--muted); padding: 2px 6px; border-radius: 6px; }
.m-langs a.is-on { background: var(--ink); color: #fff; }

.m-drawer { display: none; }
@media (max-width: 960px) {
  .m-hd__nav, .m-hd__right .m-hd__user, .m-hd__right .m-langs { display: none; }
  .m-hd__burger { display: inline-flex; align-items: center; justify-content: center; }
  .m-hd__in { height: 60px; }
  .m-hd__logo img { height: 34px; }
  .m-drawer.is-open { display: block; position: fixed; inset: 60px 0 0 0; z-index: 49; background: rgba(255, 255, 255, .98); padding: 16px 20px 40px; overflow: auto; }
  .m-drawer a { display: block; padding: 14px 4px; font-size: 18px; font-weight: 800; text-decoration: none; border-bottom: 1px solid var(--line); }
  .m-drawer .m-langs { margin-top: 18px; display: flex; }
  .m-drawer .m-langs a { border: 0; font-size: 14px; padding: 6px 10px; }
}

/* ---------- 버튼·칩 ---------- */
.m-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 999px; border: 0; font-weight: 800; font-size: 16px; text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.m-btn:active { transform: scale(.97); }
.m-btn--run { background: var(--run); color: #fff; box-shadow: 0 8px 20px rgba(255, 122, 26, .35); }
.m-btn--run:hover { background: var(--run-deep); }
.m-btn--turf { background: var(--turf); color: #fff; }
.m-btn--turf:hover { background: var(--turf-deep); }
.m-btn--ghost { background: rgba(255, 255, 255, .16); color: #fff; border: 1.5px solid rgba(255, 255, 255, .7); }
.m-btn--line { background: #fff; color: var(--turf); border: 1.5px solid var(--turf); }
.m-btn--sm { height: 38px; padding: 0 16px; font-size: 14px; }
.m-btn--block { display: flex; width: 100%; }
.m-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--turf-soft); color: var(--turf); }
.m-chip--sun { background: #fff3cf; color: #8a5a00; }
.m-chip--sky { background: var(--sky-soft); color: #11679a; }
.m-chip--run { background: #ffe8d6; color: var(--run-deep); }

/* ---------- 히어로 (메인) ---------- */
.m-hero { position: relative; min-height: 560px; display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: var(--turf-deep) center/cover no-repeat; }
.m-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 40, 20, .78), rgba(10, 40, 20, .15) 70%), linear-gradient(180deg, rgba(10, 40, 20, 0) 40%, rgba(10, 40, 20, .7) 100%); }
.m-hero__in { position: relative; padding: 120px 20px 64px; }
.m-hero__eyebrow { display: inline-block; font-weight: 800; letter-spacing: .08em; font-size: 13px; color: var(--sun); margin-bottom: 14px; }
.m-hero__title { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 7vw, 76px); line-height: 1.08; margin: 0 0 18px; text-shadow: 0 4px 24px rgba(0, 0, 0, .25); }
.m-hero__title em { font-style: normal; color: var(--sun); }
.m-hero__desc { max-width: 560px; font-size: 17px; opacity: .92; margin: 0 0 28px; }
.m-hero__cta { display: flex; flex-wrap: wrap; gap: 10px; }
.m-hero__stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.m-hero__stat { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 14px; padding: 10px 16px; font-size: 13px; }
.m-hero__stat b { display: block; font-family: var(--display); font-weight: 400; font-size: 24px; color: #fff; line-height: 1.2; }
@media (max-width: 640px) { .m-hero { min-height: 520px; } .m-hero__in { padding: 96px 20px 40px; } .m-hero__desc { font-size: 15px; } }

/* 흰 펜스 구분선 */
.m-fence { height: 34px; background:
  linear-gradient(#fff, #fff) 0 9px / 100% 5px no-repeat,
  linear-gradient(#fff, #fff) 0 21px / 100% 5px no-repeat,
  repeating-linear-gradient(90deg, #fff 0 7px, transparent 7px 64px) 0 0 / 100% 100%;
  filter: drop-shadow(0 2px 2px rgba(15, 77, 37, .15)); }
.m-fence--onturf { background-color: var(--turf); }

/* ---------- 섹션 ---------- */
.m-sec { padding: 72px 0; }
.m-sec--turf { background: var(--turf); color: #fff; }
.m-sec--sky { background: linear-gradient(180deg, var(--sky-soft), var(--bg)); }
.m-sec--cream { background: var(--cream); }
.m-head { text-align: center; margin-bottom: 36px; }
.m-head__eyebrow { display: block; font-size: 13px; font-weight: 800; letter-spacing: .14em; color: var(--run); margin-bottom: 8px; }
.m-head__title { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 4.2vw, 42px); line-height: 1.2; margin: 0; }
.m-head__desc { color: var(--muted); margin: 10px auto 0; max-width: 620px; }
.m-sec--turf .m-head__desc { color: rgba(255, 255, 255, .8); }
.m-sec--turf .m-head__eyebrow { color: var(--sun); }
@media (max-width: 640px) { .m-sec { padding: 52px 0; } }

/* ---------- 카드·그리드 ---------- */
.m-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.m-grid--2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.m-grid--4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.m-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; border: 1px solid var(--line); position: relative; }
a.m-card { display: block; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
a.m-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(15, 77, 37, .16); }
.m-card__title { font-weight: 800; font-size: 18px; margin: 0 0 6px; }
.m-card__meta { color: var(--muted); font-size: 14px; margin: 0; }
.m-card__go { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; background: var(--turf-soft); color: var(--turf); display: flex; align-items: center; justify-content: center; font-weight: 900; }

/* 최고 배당 카드 */
.m-odds { text-align: center; padding: 26px 20px; overflow: hidden; }
.m-odds__rank { position: absolute; top: 14px; left: 14px; width: 34px; height: 34px; border-radius: 50%; background: var(--sun); color: var(--ink); font-family: var(--display); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.m-odds__race { font-weight: 800; margin: 6px 0 2px; }
.m-odds__date { color: var(--muted); font-size: 13px; }
.m-odds__num { font-family: var(--display); font-size: 64px; line-height: 1; color: var(--run); margin: 16px 0 6px; }
.m-odds__num small { font-size: 26px; margin-left: 2px; }
.m-sec--turf .m-card { color: var(--ink); }

/* 단계 */
.m-steps { counter-reset: step; }
.m-step { padding-top: 56px; }
.m-step::before { counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; top: 18px; left: 22px; font-family: var(--display); font-size: 30px; color: var(--turf); opacity: .9; }
.m-step__title { font-weight: 800; font-size: 18px; margin: 0 0 6px; }
.m-step p { margin: 0; color: var(--muted); font-size: 14px; }

/* 사진 띠 */
.m-band { position: relative; border-radius: 26px; overflow: hidden; min-height: 320px; display: flex; align-items: center; color: #fff; background: var(--turf-deep) center/cover no-repeat; }
.m-band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 40, 20, .85), rgba(10, 40, 20, .25)); }
.m-band__in { position: relative; padding: 40px; max-width: 560px; }
.m-band__title { font-family: var(--display); font-weight: 400; font-size: clamp(26px, 3.6vw, 38px); line-height: 1.25; margin: 0 0 12px; }
.m-band p { opacity: .9; margin: 0 0 22px; }

/* ---------- 하위 페이지 머리 (사진) ---------- */
.m-ph { position: relative; color: #fff; background: var(--turf-deep) center/cover no-repeat; overflow: hidden; }
.m-ph::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 40, 20, .25), rgba(10, 40, 20, .78)); }
.m-ph__in { position: relative; padding: 64px 20px 34px; }
.m-ph__eyebrow { color: var(--sun); font-weight: 800; font-size: 13px; letter-spacing: .1em; }
.m-ph__title { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 5vw, 44px); line-height: 1.15; margin: 6px 0 6px; }
.m-ph__desc { opacity: .9; margin: 0; }
.is-app .m-ph__in { padding-top: calc(28px + var(--app-top, 0px)); }

/* ---------- 경주 목록·예상 ---------- */
.m-area, a.m-card.m-area { display: flex; align-items: center; gap: 16px; padding: 20px 22px; }
.m-area__flag { width: 56px; height: 56px; border-radius: 16px; background: var(--turf); color: #fff; font-family: var(--display); font-size: 22px; display: flex; align-items: center; justify-content: center; flex: none; }
.m-area__name { font-family: var(--display); font-size: 26px; line-height: 1.1; }
.m-race, a.m-card.m-race { display: flex; align-items: center; gap: 16px; padding: 18px 60px 18px 18px; }
.m-race__no { flex: none; width: 58px; height: 58px; border-radius: 50%; background: var(--sun); color: var(--ink); font-family: var(--display); font-size: 26px; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12); }
.m-race__no small { font-size: 12px; margin-left: 1px; }
.m-race__time { font-family: var(--display); color: var(--run); font-size: 20px; }

.m-podium { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); align-items: end; }
.m-podium__item { text-align: center; padding: 22px 12px 18px; }
.m-podium__item.is-1 { order: 2; padding-top: 34px; border: 2px solid var(--sun); }
.m-podium__item.is-2 { order: 1; }
.m-podium__item.is-3 { order: 3; }
.m-medal { width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 50%; font-family: var(--display); font-size: 20px; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.is-1 .m-medal { background: var(--sun); width: 56px; height: 56px; font-size: 24px; }
.is-2 .m-medal { background: #dfe6ea; }
.is-3 .m-medal { background: #f0c9a0; }
.m-podium__no { font-family: var(--display); font-size: 40px; line-height: 1; color: var(--turf); }
.is-1 .m-podium__no { font-size: 52px; color: var(--run); }
.m-podium__name { font-weight: 800; margin: 6px 0 10px; font-size: 15px; }
@media (max-width: 560px) { .m-podium { gap: 8px; } .m-podium__item { padding: 16px 6px 12px; } .m-podium__no { font-size: 30px; } .is-1 .m-podium__no { font-size: 40px; } .m-podium__name { font-size: 13px; } }

.m-bet, a.m-card.m-bet { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.m-bet__type { flex: none; min-width: 78px; font-weight: 900; color: var(--turf); }
.m-bet__pick { font-family: var(--display); font-size: 20px; }
.m-bet__desc { color: var(--muted); font-size: 13px; margin-left: auto; text-align: right; }

/* ---------- 표 ---------- */
.m-table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.m-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.m-table th { background: var(--turf); color: #fff; font-weight: 800; padding: 12px 10px; white-space: nowrap; }
.m-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.m-table tr:last-child td { border-bottom: 0; }
.m-table tr:nth-child(even) td { background: #fafdf8; }
.m-hit { color: var(--run); font-weight: 900; }
.m-miss { color: #b6c0b9; }

/* 날짜·탭 */
.m-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.m-tabs::-webkit-scrollbar { display: none; }
.m-tabs a { flex: none; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 700; font-size: 14px; }
.m-tabs a.is-on { background: var(--turf); border-color: var(--turf); color: #fff; }

/* 빈 화면 */
.m-empty { text-align: center; padding: 30px 20px 10px; }
.m-empty__img { width: 160px; height: 160px; border-radius: 50%; margin: 0 auto 18px; background: center/cover no-repeat; border: 6px solid #fff; box-shadow: var(--shadow); }
.m-empty__title { font-family: var(--display); font-size: 26px; margin: 0 0 6px; }
.m-empty p { color: var(--muted); margin: 0; }

/* 요금제 */
.m-plan { text-align: center; padding: 30px 24px; }
.m-plan.is-best { border: 2px solid var(--run); }
.m-plan__badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--run); color: #fff; font-size: 12px; font-weight: 900; padding: 4px 12px; border-radius: 999px; }
.m-plan__name { font-weight: 900; color: var(--turf); }
.m-plan__price { font-family: var(--display); font-size: 46px; line-height: 1.1; margin: 10px 0 4px; }
.m-plan__price small { font-size: 20px; }
.m-plan__per { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.m-plan ul { list-style: none; padding: 0; margin: 0 0 22px; text-align: left; }
.m-plan li { padding: 6px 0 6px 26px; position: relative; font-size: 14px; }
.m-plan li::before { content: "✓"; position: absolute; left: 4px; color: var(--turf); font-weight: 900; }

/* ---------- 꼬리 ---------- */
.m-ft { background: var(--turf-deep); color: rgba(255, 255, 255, .78); font-size: 13px; padding: 40px 0 calc(40px + var(--app-bottom, 0px)); }
.m-ft__top { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.m-ft__logo img { height: 36px; width: auto; display: block; }
.m-ft__links { display: flex; flex-wrap: wrap; gap: 16px; }
.m-ft__links a { color: #fff; text-decoration: none; font-weight: 700; }
.m-ft p { margin: 2px 0; }

/* ---------- 앱 안 (새 앱) ---------- */
.is-app .m-hd, .is-app .m-ft, .is-app .m-drawer, .is-app .m-app-hide { display: none !important; }
.is-app #container { margin-top: calc(16px + var(--app-top, 0px)); margin-bottom: calc(24px + var(--app-bottom, 0px)); }
.is-app .m-page-end { height: calc(24px + var(--app-bottom, 0px)); }

/* ---------- 그누보드 기본 스킨에 색 입히기 ---------- */
.btn_submit, a.btn_submit, button.btn_submit, .btn_b02, a.btn_b02 { background: var(--turf) !important; border-color: var(--turf) !important; color: #fff !important; border-radius: 10px; }
.btn_b01, a.btn_b01 { border-radius: 10px; }
.pg_current { background: var(--turf); border-color: var(--turf); }
#bo_list .td_subject a:hover, #bo_v_title a:hover { color: var(--turf); }
#bo_list .tbl_head01 thead th, .tbl_head01 thead th { background: var(--turf-soft); color: var(--turf-deep); }
.frm_input:focus, .required:focus { border-color: var(--turf) !important; box-shadow: 0 0 0 3px rgba(30, 123, 60, .15) !important; }
#mb_login, .mbskin { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- 예상·말 정보·성적·결제 (pick·horse·raceprop·pay) ---------- */
.m-bar-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 18px; flex-wrap: wrap; }
.m-ball { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 6px; box-sizing: border-box; border-radius: 999px; background: var(--turf-soft); color: var(--turf-deep); font-family: var(--display); font-size: 18px; line-height: 1; }
.m-ball.is-1 { background: var(--sun); color: var(--ink); }
.m-ball.is-run { background: var(--run); color: #fff; }
.m-balls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.m-balls i { font-style: normal; color: var(--muted); font-weight: 900; }
.m-bet--stack, a.m-card.m-bet--stack { flex-wrap: wrap; row-gap: 8px; }
.m-bet--stack .m-bet__desc { flex-basis: 100%; margin-left: 0; text-align: left; }
.m-stat { padding: 16px 18px; }
.m-stat__label { display: block; font-size: 13px; font-weight: 800; color: var(--muted); }
.m-stat__val { display: block; font-family: var(--display); font-size: 24px; line-height: 1.25; margin-top: 4px; overflow-wrap: anywhere; }
.m-stat__val.is-run { color: var(--run); font-size: 34px; }
.m-grid--stat { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.m-select { width: 100%; height: 50px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font-size: 16px; font-weight: 700; color: var(--ink); box-shadow: var(--shadow); }
.m-select:focus { outline: 0; border-color: var(--turf); }
.m-rate__num { font-family: var(--display); font-size: 46px; line-height: 1; color: var(--run); margin: 10px 0 6px; }
.m-rate__num small { font-size: 22px; margin-left: 2px; }
.m-meter { height: 8px; border-radius: 999px; background: var(--turf-soft); overflow: hidden; margin-top: 12px; }
.m-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--turf), var(--sun)); }
.m-loading { display: none; position: fixed; inset: 0; z-index: 1000; background: rgba(10, 40, 20, .45); align-items: center; justify-content: center; }
.m-loading.is-on { display: flex; }
.m-loading span { width: 48px; height: 48px; border-radius: 50%; border: 5px solid rgba(255, 255, 255, .35); border-top-color: var(--sun); animation: mSpin .8s linear infinite; }
@keyframes mSpin { to { transform: rotate(360deg); } }
