/* ══════════════════════════════════════════════════════
   밀롱가 공통 스타일  (mg-fix-2026-08-02)
   이 파일 하나만 고치면 모든 페이지에 반영됩니다.
   ══════════════════════════════════════════════════════ */

  #mgLangBar{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;
    padding:11px 16px;background:linear-gradient(135deg,#FFF6E4,#FBEBCF);
    border-bottom:1px solid #C9A24B;font-size:16px;color:#4A1019;
    font-family:'Pretendard Variable',Pretendard,-apple-system,'Malgun Gothic',sans-serif;}
  #mgLangBar .mg-go{border:1px solid #C9A24B;background:#fff;color:#7E2536;
    font-family:inherit;font-size:16px;font-weight:700;padding:9px 20px;border-radius:20px;cursor:pointer;}
  #mgLangBar .mg-go:hover{background:#7E2536;color:#fff;border-color:#7E2536;}
  #mgLangBar .mg-x{border:none;background:transparent;color:#8A7A6E;font-size:19px;
    line-height:1;padding:6px 10px;cursor:pointer;border-radius:50%;}
  #mgLangBar .mg-x:hover{background:rgba(126,37,54,.10);color:#7E2536;}
  @media (max-width:480px){ #mgLangBar{font-size:15px;gap:8px;padding:9px 12px;} }
  /* 아랍어·페르시아어 : 글을 오른쪽부터 읽습니다 */
  html[dir="rtl"] body{ text-align:right; }
  html[dir="rtl"] .mg-modal-actions,
  html[dir="rtl"] #mgLangBar{ flex-direction:row-reverse; }
  html[dir="rtl"] input, html[dir="rtl"] textarea, html[dir="rtl"] select{ text-align:right; }


  /* ① 상세창·등록창 가로 최대 1000px — 휴대폰에서는 화면 크기에 맞게 자동으로 줄어듭니다 */
  .modal-overlay.mg-wide > .modal-box{ max-width:1000px !important; width:100% !important; }
  /* 창이 넓어진 만큼 위쪽 큰 사진이 너무 높아지지 않게 높이를 제한합니다 */
  .modal-overlay.mg-wide > .modal-box .detail-photo,
  .modal-overlay.mg-wide > .modal-box .hero-photo{ max-height:360px !important; }

  /* ② 상세창 하단 [목록] [닫기] 버튼 */
  .mg-modal-actions{
    display:flex; gap:10px; justify-content:center;
    padding:18px 24px 24px; margin-top:6px;
    border-top:1px solid rgba(42,33,29,0.12);
  }
  .mg-modal-actions button{
    min-width:136px; padding:13px 26px; border-radius:8px;
    font-family:inherit; font-size:16px; font-weight:700; cursor:pointer;
    transition:filter .15s ease, background .15s ease;
  }
  .mg-btn-list{ border:1px solid #C9A24B; background:#FFF9EE; color:#7E2536; }
  .mg-btn-list:hover{ background:#F6EAD1; }
  .mg-btn-close{ border:none; background:linear-gradient(135deg,#7E2536,#4A1019); color:#fff; }
  .mg-btn-close:hover{ filter:brightness(1.12); }
  @media (max-width:480px){
    .mg-modal-actions{ padding:14px 16px 18px; }
    .mg-modal-actions button{ min-width:0; flex:1; padding:12px 8px; }
  }

  /* ③ 맨 위 헤더도 본문과 같은 1200px 폭 안에 맞춥니다 (PC에서만)
        - 큰 모니터에서 로고·메뉴·로그인이 화면 양 끝에 붙지 않고
          아래 내용과 같은 세로선에 맞춰집니다.
        - 원래대로 되돌리려면 이 @media 묶음만 지우면 됩니다. */
  @media (min-width:1249px){
    body > header, body > .topbar{
      padding-left: calc((100% - 1160px) / 2) !important;
      padding-right: calc((100% - 1160px) / 2) !important;
    }
  }

  /* ══ ④ 밀롱가 타이틀(로고) 글자를 20% 키웁니다 — PC 화면에서만 (2026-08-02)
        25px → 30px. 휴대폰은 원래 크기 그대로 둡니다. */
  @media (min-width:862px){
    header .logo{ font-size:30px !important; }
    header .logo .txt .kr{ font-size:30px !important; }
  }

  /* ══ ⑤ 채팅 말풍선 : 글자가 세로로 한 글자씩 잘리던 문제 (2026-08-02)
        원인 — 말풍선에 준 "가로 60%" 가 어느 상자의 60% 인지 브라우저가
        정하지 못해 폭이 0 에 가깝게 쪼그라들었습니다.
        고침 — 60% 를 바깥 상자에 주고, 말풍선은 그 안을 꽉 채우게 합니다. */
  .msg-row > div{ max-width:62%; min-width:0; }
  .msg-bubble{
    max-width:100% !important; min-width:0;
    overflow-wrap:break-word; word-break:break-word; white-space:pre-wrap;
  }
  /* 대화가 몇 줄뿐일 때 위쪽에 큰 빈칸이 생기지 않도록 아래에 붙입니다 */
  .thread-body > .msg-row:first-child{ margin-top:auto; }


  /* ══════════════════════════════════════════════════════
     상세페이지 — 포스터형 (2026-08-04)
     밀롱가 · 교육/대회 · 장소임대 상세창에 한꺼번에 적용됩니다.
     되돌리려면 이 묶음만 지우면 됩니다.
     ══════════════════════════════════════════════════════ */
  .mg-detail{
    --d-line: rgba(42,33,29,0.12);
    --d-wine: #7E2536;  --d-deep: #4A1019;
    --d-gold: #C9A24B;  --d-gold3: #9C7228;
    --d-ink:  #2A211D;  --d-sub: #8A7A6E;
    --d-soft: #FCF8F1;  --d-dark: #2E1016;
    overflow:hidden; position:relative;
  }

  /* ── 윗부분 : 왼쪽 포스터 · 오른쪽 정보 ── */
  .mg-detail .mg-top{ display:grid; grid-template-columns:430px 1fr; align-items:stretch; }

  .mg-detail .mg-top .modal-poster,
  .mg-detail .mg-top .detail-photo{
    position:relative; overflow:hidden;
    display:block !important;
    aspect-ratio:auto !important;
    height:auto !important; max-height:none !important; min-height:480px;
    padding:0 !important; border-radius:0 !important;
    background-color:var(--d-dark) !important;
    background-repeat:no-repeat !important;
  }
  /* 포스터 : 좌우는 항상 딱 맞추고, 위아래만 조절합니다 (2026-08-04)
     · 가로 = 칸 너비에 정확히 맞춤 (좌우가 잘리는 일이 없습니다)
     · 세로 = 사진이 길면 위아래를 조금만 잘라내고,
              짧으면 위아래에 어두운 여백이 남습니다 */
  /* 아래층 : 원래 배경사진을 완전히 덮는 어두운 판 (사진이 두 번 겹쳐 보이는 것을 막습니다) */
  .mg-detail .mg-top .modal-poster::before,
  .mg-detail .mg-top .detail-photo::before{
    content:'' !important; display:block !important;
    position:absolute !important; inset:0 !important;
    background:var(--d-dark) !important;
    filter:none !important; z-index:0 !important;
  }
  /* 윗층 : 포스터 사진 — 가로 100%, 세로는 비율대로 */
  .mg-detail .mg-top .modal-poster::after{
    content:'' !important; display:block !important;
    position:absolute !important; inset:0 !important;
    background-image:inherit !important;
    background-size:100% auto !important;
    background-repeat:no-repeat !important;
    background-position:center center !important;
    filter:none !important; z-index:1 !important;
  }
  .mg-detail .mg-top .detail-photo > img{
    position:absolute !important;
    left:0 !important; right:0 !important;
    top:50% !important; bottom:auto !important;
    transform:translateY(-50%) !important;
    width:100% !important; height:auto !important;
    max-width:none !important; max-height:none !important;
    object-fit:fill !important; object-position:center !important;
    border-radius:0 !important; box-shadow:none !important;
    z-index:1 !important;
  }
  .mg-detail .mg-top .detail-photo::after{ display:none !important; }

  /* 사진이 없을 때 — 위아래로 쌓고 얇은 와인 띠만 */
  .mg-detail .mg-top.mg-noimg{ display:block; }
  .mg-detail .mg-top.mg-noimg .modal-poster,
  .mg-detail .mg-top.mg-noimg .detail-photo{
    min-height:0 !important; height:96px !important; padding:0 !important;
    background:linear-gradient(135deg, var(--d-wine), var(--d-deep)) !important;
  }
  .mg-detail .mg-top.mg-noimg .modal-poster::before,
  .mg-detail .mg-top.mg-noimg .modal-poster::after,
  .mg-detail .mg-top.mg-noimg .detail-photo::before{ display:none !important; }
  .mg-detail .mg-top.mg-noimg .modal-poster svg,
  .mg-detail .mg-top.mg-noimg .detail-photo svg{ width:36px !important; height:36px !important; opacity:.42; }

  /* ── 오른쪽 정보 칸 ── */
  .mg-detail .mg-side{
    padding:38px 36px 34px; display:flex; flex-direction:column; min-width:0;
  }
  .mg-detail .mg-eyebrow{
    font-size:13px; font-weight:800; letter-spacing:0.2em;
    color:var(--d-gold3); margin-bottom:12px; text-transform:uppercase;
  }
  .mg-detail .modal-title,
  .mg-detail .detail-name{
    font-family:'Noto Serif KR', serif !important;
    font-size:34px !important; font-weight:900 !important;
    line-height:1.3 !important; color:var(--d-ink) !important;
    word-break:keep-all; letter-spacing:-0.01em;
  }
  .mg-detail .modal-title::after,
  .mg-detail .detail-name::after{
    content:''; display:block; width:58px; height:3px; border-radius:2px; margin:18px 0 4px;
    background:linear-gradient(90deg, var(--d-gold), var(--d-wine));
  }

  /* 정보 줄 */
  .mg-detail .mg-side .modal-meta-list,
  .mg-detail .mg-side .detail-info-list,
  .mg-detail .mg-side .detail-contact{
    background:transparent !important; border:none !important; padding:0 !important;
    margin:20px 0 0 !important; display:flex !important; flex-direction:column !important;
    gap:15px !important; font-size:17px !important; color:var(--d-ink) !important;
  }
  .mg-detail .mg-side .modal-meta-item{
    font-size:17px !important; align-items:flex-start !important; gap:12px !important;
    line-height:1.6 !important; color:var(--d-ink) !important;
  }
  .mg-detail .mg-side .modal-meta-item svg{
    width:19px !important; height:19px !important; color:var(--d-gold3) !important; margin-top:3px !important;
  }
  .mg-detail .mg-side .detail-badges{ gap:8px !important; margin-top:18px !important; }
  .mg-detail .detail-tag{ font-size:14.5px !important; padding:8px 15px !important; border-radius:18px !important; }
  .mg-detail .mg-side .detail-instructor{ margin-top:18px !important; }
  .mg-detail .mg-side .detail-instructor .val{ font-size:17px !important; font-weight:800 !important; }

  /* 참가비·가격 */
  .mg-detail .fee-highlight,
  .mg-detail .detail-price{
    display:inline-block; padding:4px 14px; border-radius:20px;
    background:rgba(201,162,75,0.18); color:var(--d-gold3) !important;
    border:1px solid rgba(201,162,75,0.45); font-weight:800 !important; font-size:16.5px !important;
  }
  .mg-detail .mg-side .detail-price-row{
    margin-top:auto !important; padding-top:24px !important; border-top:none !important;
    display:flex !important; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
  }
  .mg-detail .map-link-btn{ font-size:14.5px !important; padding:6px 13px !important; border-radius:16px !important; }

  /* 큰 버튼 — 정보 칸 맨 아래에 붙습니다 */
  .mg-detail .mg-side #modalAttendeeCount{
    margin-top:auto !important; padding-top:24px !important;
    font-size:15px !important; color:var(--d-sub) !important;
  }
  .mg-detail .mg-side #attendeeNameList{ font-size:14.5px !important; margin-bottom:10px !important; }
  .mg-detail .mg-side .modal-cta{
    width:100% !important; margin-top:14px !important;
    padding:17px 24px !important; border-radius:12px !important;
    font-size:17.5px !important; font-weight:800 !important;
    background:linear-gradient(135deg, var(--d-wine), var(--d-deep)) !important;
    color:#fff !important; border:none !important;
    box-shadow:0 8px 18px rgba(126,37,54,0.26);
  }
  .mg-detail .mg-side .modal-cta.rsvped{
    background:transparent !important; color:var(--d-wine) !important;
    border:1.5px solid var(--d-wine) !important; box-shadow:none;
  }
  .mg-detail .mg-side .btn-chat-organizer{
    width:100% !important; margin-top:10px !important;
    padding:15px 22px !important; border-radius:12px !important;
    font-size:16px !important; font-weight:800 !important;
  }
  .mg-detail button.detail-cta,
  .mg-detail a.detail-cta{
    padding:15px 30px !important; border-radius:12px !important;
    font-size:16.5px !important; font-weight:800 !important;
    background:linear-gradient(135deg, var(--d-wine), var(--d-deep)) !important;
    color:#fff !important; border:none !important;
    box-shadow:0 6px 16px rgba(126,37,54,0.22);
  }

  /* ── 아랫부분 본문 ── */
  .mg-detail .modal-body,
  .mg-detail .detail-body{ padding:34px 38px 30px !important; }
  .mg-detail .mg-top + .modal-body,
  .mg-detail .mg-top + .detail-body{ border-top:1px solid var(--d-line); }

  .mg-detail .modal-desc,
  .mg-detail .detail-desc,
  .mg-detail .detail-bio{
    font-size:18px !important; line-height:1.95 !important;
    color:var(--d-ink) !important; margin:0 0 34px !important;
    white-space:pre-wrap; word-break:keep-all;
  }

  .mg-detail h3{
    font-family:'Noto Serif KR', serif !important;
    font-size:21px !important; font-weight:900 !important; color:var(--d-ink) !important;
    display:flex !important; align-items:center; gap:12px; margin-bottom:16px !important;
  }
  .mg-detail h3::after{ content:''; flex:1; height:1px; background:var(--d-line); }

  .mg-detail .modal-gallery-section,
  .mg-detail .video-embed-section,
  .mg-detail .modal-comment-section,
  .mg-detail .comment-section,
  .mg-detail .mg-map,
  .mg-detail .avail-section{ margin-top:34px !important; padding-top:0 !important; border-top:none !important; }

  /* ── 지도 ── */
  .mg-detail .mg-map-frame{
    position:relative; width:100%; height:330px; border-radius:14px; overflow:hidden;
    border:1px solid var(--d-line); background:#EFE7DC;
  }
  .mg-detail .mg-map-frame iframe,
  .mg-detail .mg-map-canvas{ position:absolute; inset:0; width:100%; height:100%; border:0; }
  /* 지도를 그릴 수 없을 때 (열쇠 없음·주소 못 찾음) 는 지도 칸을 아예 감춥니다 */
  .mg-detail .mg-map-frame.mg-map-off{ display:none !important; }
  .mg-detail .mg-map-frame.mg-map-wait::after{
    content:''; position:absolute; inset:0; background:#EFE7DC;
    background-image:linear-gradient(100deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.6) 50%, rgba(255,255,255,0) 70%);
    background-size:200% 100%; animation:mgShine 1.2s linear infinite; pointer-events:none;
  }
  @keyframes mgShine{ from{ background-position:200% 0; } to{ background-position:-200% 0; } }
  .mg-detail .mg-map-note{ margin-top:12px; font-size:16px; line-height:1.7; color:var(--d-ink); }
  .mg-detail .mg-map-note .mg-map-open{
    display:inline-block; margin-top:8px; font-size:15px; font-weight:800;
    color:var(--d-gold3); border-bottom:1px solid rgba(201,162,75,0.6);
  }

  /* ── 사진첩 ── */
  .mg-detail .modal-gallery-grid,
  .mg-detail .detail-gallery{
    display:grid !important; grid-template-columns:repeat(4, 1fr) !important; gap:12px !important;
  }
  .mg-detail .modal-gallery-grid > *,
  .mg-detail .detail-gallery > *{
    aspect-ratio:auto !important; height:140px !important;
    border-radius:11px !important; overflow:hidden; cursor:zoom-in;
    transition:transform .2s ease, box-shadow .2s ease;
  }
  .mg-detail .modal-gallery-grid > *:hover,
  .mg-detail .detail-gallery > *:hover{
    transform:translateY(-2px); box-shadow:0 8px 20px rgba(42,33,29,0.16);
  }
  .mg-detail .modal-gallery-grid img,
  .mg-detail .detail-gallery img{
    width:100% !important; height:100% !important; object-fit:cover !important;
    border-radius:0 !important; display:block;
  }

  /* ── 댓글 ── */
  .mg-detail .comment-item{ padding:15px 0 !important; }
  .mg-detail .comment-author{ font-size:16px !important; font-weight:800 !important; }
  .mg-detail .comment-text{ font-size:16.5px !important; line-height:1.75 !important; }
  .mg-detail .comment-form input{ padding:14px 17px !important; font-size:16.5px !important; border-radius:11px !important; }
  .mg-detail .comment-form button{ padding:14px 24px !important; font-size:16.5px !important; border-radius:11px !important; font-weight:800 !important; }

  /* ── 하단 [목록][닫기] ── */
  .mg-detail .modal-bottom-actions{ margin-top:34px !important; padding-top:24px !important; }
  .mg-detail .modal-bottom-btn{ padding:15px !important; font-size:16.5px !important; border-radius:11px !important; font-weight:800 !important; }
  .mg-detail .mg-modal-actions{
    margin-top:0 !important; padding:24px 38px 30px !important;
    border-top:1px solid var(--d-line) !important;
  }
  .mg-detail .mg-modal-actions button{
    flex:1 !important; min-width:0 !important;
    padding:15px !important; font-size:16.5px !important; border-radius:11px !important; font-weight:800 !important;
  }
  .mg-detail .organizer-actions{ margin-top:26px !important; border-radius:12px !important; }
  .mg-detail .video-open-new{ margin-top:12px !important; display:inline-flex !important; }

  /* ══ 땅게로스 프로필 페이지도 같은 결로 (milonga_profile.html) ══ */
  .hero .hero-name{
    font-family:'Noto Serif KR', serif !important;
    font-size:36px !important; font-weight:900 !important; letter-spacing:-0.01em;
  }
  .hero .hero-name::after{
    content:''; display:block; width:58px; height:3px; border-radius:2px; margin:16px 0 2px;
    background:linear-gradient(90deg, #C9A24B, #7E2536);
  }
  .body-wrap h2{
    font-family:'Noto Serif KR', serif !important;
    font-size:21px !important; font-weight:900 !important;
    display:flex !important; align-items:center; gap:12px;
  }
  .body-wrap h2::after{ content:''; flex:1; height:1px; background:rgba(42,33,29,0.12); }
  .hero .hero-bio{ font-size:18px !important; line-height:1.95 !important; max-width:780px !important; }

  /* ── 좁은 화면 ── */
  @media (max-width:1000px){
    .mg-detail .mg-top{ grid-template-columns:360px 1fr; }
    .mg-detail .mg-top .modal-poster, .mg-detail .mg-top .detail-photo{ min-height:420px; }
  }
  @media (max-width:900px){
    .mg-detail .mg-top{ display:block !important; }
    /* 휴대폰 : 가로는 꽉 채우고 세로는 3:4 비율 — 세로로 긴 포스터도 거의 안 잘립니다 */
    .mg-detail .mg-top .modal-poster, .mg-detail .mg-top .detail-photo{
      min-height:0 !important; height:auto !important;
      aspect-ratio:3 / 4 !important; padding:0 !important;
    }
    .mg-detail .mg-side{ padding:28px 22px 26px; }
    .mg-detail .modal-title, .mg-detail .detail-name{ font-size:26px !important; }
    .mg-detail .modal-body, .mg-detail .detail-body{ padding:26px 22px 24px !important; }
    .mg-detail .modal-gallery-grid, .mg-detail .detail-gallery{ grid-template-columns:repeat(3,1fr) !important; }
    .mg-detail .mg-modal-actions{ padding:20px 22px 24px !important; }
    .hero .hero-name{ font-size:28px !important; }
  }
  @media (max-width:600px){
    .mg-detail .mg-top .modal-poster, .mg-detail .mg-top .detail-photo{
      height:auto !important; aspect-ratio:3 / 4 !important; padding:0 !important; }
    .mg-detail .mg-side{ padding:24px 18px 22px; }
    .mg-detail .modal-title, .mg-detail .detail-name{ font-size:24px !important; }
    .mg-detail .mg-side .modal-meta-item{ font-size:16px !important; }
    .mg-detail .modal-desc, .mg-detail .detail-desc, .mg-detail .detail-bio{ font-size:17px !important; }
    .mg-detail .modal-body, .mg-detail .detail-body{ padding:24px 18px 22px !important; }
    .mg-detail .modal-gallery-grid, .mg-detail .detail-gallery{ grid-template-columns:repeat(2,1fr) !important; }
    .mg-detail .modal-gallery-grid > *, .mg-detail .detail-gallery > *{ height:118px !important; }
    .mg-detail h3{ font-size:18px !important; }
    .mg-detail .mg-map-frame{ height:250px; }
    .mg-detail .mg-modal-actions{ padding:18px 18px 22px !important; }
    .mg-detail .modal-meta-item{ flex-wrap:wrap !important; }
    .mg-detail .modal-meta-item > span{ flex:1 1 0 !important; min-width:0 !important; }
    .mg-detail .modal-meta-item .map-link-btn{
      flex:0 0 100% !important; width:fit-content;
      margin-left:31px !important; margin-top:7px !important;
    }
    .hero .hero-name{ font-size:26px !important; }
    .body-wrap h2{ font-size:18px !important; }
  }

  /* ══════════════════════════════════════════════════════
     [전체화면보기] — 상세창을 브라우저 창 전체로 넓혀 봅니다 (2026-08-04)
     · 브라우저의 진짜 전체화면(F11)이 아니라, 주소창은 그대로 두고
       창 안쪽만 꽉 채웁니다.
     · 되돌리려면 이 묶음과 .mg-full-btn 관련 줄만 지우면 됩니다.
     ══════════════════════════════════════════════════════ */
  .mg-detail .mg-full-btn{
    position:absolute; top:14px; left:14px; z-index:30;
    display:inline-flex; align-items:center; gap:7px;
    padding:9px 15px; border-radius:22px;
    border:1px solid rgba(255,255,255,0.42);
    background:rgba(46,16,22,0.60); color:#fff;
    font-family:inherit; font-size:14.5px; font-weight:800;
    line-height:1; cursor:pointer; white-space:nowrap;
    -webkit-backdrop-filter:blur(5px); backdrop-filter:blur(5px);
    box-shadow:0 3px 12px rgba(0,0,0,0.28);
    transition:background .15s ease, transform .15s ease;
  }
  .mg-detail .mg-full-btn:hover{ background:rgba(126,37,54,0.94); transform:translateY(-1px); }
  .mg-detail .mg-full-btn svg{ width:15px; height:15px; flex:none; }

  .modal-overlay.mg-fullview{
    padding:0 !important; align-items:flex-start !important; justify-content:center !important;
  }
  .modal-overlay.mg-fullview > .modal-box{
    max-width:none !important; width:100% !important;
    max-height:none !important; height:100vh !important; height:100dvh !important;
    border-radius:0 !important; margin:0 !important; overflow-y:auto !important;
  }
  .modal-overlay.mg-fullview .mg-top{ grid-template-columns:minmax(0,38%) 1fr !important; }
  .modal-overlay.mg-fullview .mg-top .modal-poster,
  .modal-overlay.mg-fullview .mg-top .detail-photo{ min-height:560px; }
  .modal-overlay.mg-fullview .mg-side{ padding:52px 56px 46px !important; }
  .modal-overlay.mg-fullview .modal-title,
  .modal-overlay.mg-fullview .detail-name{ font-size:40px !important; }
  .modal-overlay.mg-fullview .modal-body,
  .modal-overlay.mg-fullview .detail-body{ padding:42px 60px 36px !important; }
  .modal-overlay.mg-fullview .modal-gallery-grid,
  .modal-overlay.mg-fullview .detail-gallery{ grid-template-columns:repeat(5,1fr) !important; }
  .modal-overlay.mg-fullview .mg-map-frame{ height:420px; }
  .modal-overlay.mg-fullview .mg-modal-actions{ padding:26px 60px 40px !important; }
  @media (max-width:900px){
    .modal-overlay.mg-fullview .mg-top{ display:block !important; }
    .modal-overlay.mg-fullview .mg-top .modal-poster,
    .modal-overlay.mg-fullview .mg-top .detail-photo{ min-height:0 !important; }
    .modal-overlay.mg-fullview .mg-side{ padding:30px 22px 26px !important; }
    .modal-overlay.mg-fullview .modal-title,
    .modal-overlay.mg-fullview .detail-name{ font-size:27px !important; }
    .modal-overlay.mg-fullview .modal-body,
    .modal-overlay.mg-fullview .detail-body{ padding:28px 22px 24px !important; }
    .modal-overlay.mg-fullview .modal-gallery-grid,
    .modal-overlay.mg-fullview .detail-gallery{ grid-template-columns:repeat(3,1fr) !important; }
    .modal-overlay.mg-fullview .mg-map-frame{ height:280px; }
    .modal-overlay.mg-fullview .mg-modal-actions{ padding:20px 22px 28px !important; }
    .mg-detail .mg-full-btn{ top:11px; left:11px; padding:8px 13px; font-size:13.5px; }
  }

  /* ══════════════════════════════════════════════════════
     등록폼 — 단계별로 나눠 쓰기 (2026-08-04)
     한 화면에 3~5개만 적으면 되도록 나눕니다.
     되돌리려면 이 묶음과 아래 자바스크립트의 buildWizard 를 지우면 됩니다.
     ══════════════════════════════════════════════════════ */
  .modal-overlay.mg-wizov > .modal-box{ max-width:880px !important; }
  .register-body.mg-wiz-on{ padding:0 !important; }

  .mg-wiz-head{
    background:linear-gradient(135deg, #7E2536, #4A1019);
    color:#fff; padding:28px 36px 22px;
  }
  .mg-wiz-head h2{
    font-family:'Noto Serif KR', serif !important;
    font-size:26px !important; font-weight:900 !important;
    color:#fff !important; margin:0 0 6px !important; line-height:1.3;
  }
  .mg-wiz-head .sub{
    font-size:15px !important; color:rgba(255,255,255,0.80) !important;
    margin:0 !important; line-height:1.65;
  }
  .mg-wiz-track{
    height:6px; border-radius:4px; margin-top:20px;
    background:rgba(255,255,255,0.22); overflow:hidden;
  }
  .mg-wiz-track > i{
    display:block; height:100%; border-radius:4px; width:0;
    background:linear-gradient(90deg, #C9A24B, #F3DFAC);
    transition:width .32s cubic-bezier(.4,0,.2,1);
  }
  .mg-wiz-dots{ display:flex; margin-top:16px; }
  .mg-wiz-dot{
    flex:1; text-align:center; padding-top:22px; position:relative;
    font-size:13px; font-weight:800; color:rgba(255,255,255,0.55);
    transition:color .2s ease; word-break:keep-all; line-height:1.35;
  }
  .mg-wiz-dot::before{
    content:''; position:absolute; top:0; left:50%; transform:translateX(-50%);
    width:13px; height:13px; border-radius:50%;
    background:rgba(255,255,255,0.32); transition:background .2s ease, box-shadow .2s ease;
  }
  .mg-wiz-dot.done{ color:rgba(255,255,255,0.85); }
  .mg-wiz-dot.done::before{ background:#F3DFAC; }
  .mg-wiz-dot.on{ color:#fff; }
  .mg-wiz-dot.on::before{ background:#C9A24B; box-shadow:0 0 0 5px rgba(201,162,75,0.32); }

  .mg-wiz-body{ padding:32px 36px 8px; }
  .mg-wiz-step{ display:none; }
  .mg-wiz-step.on{ display:block; animation:mgWizIn .26s ease; }
  @keyframes mgWizIn{ from{ opacity:0; transform:translateY(9px); } to{ opacity:1; transform:none; } }
  .mg-wiz-t{
    font-family:'Noto Serif KR', serif; font-size:21px; font-weight:900;
    color:#2A211D; display:flex; align-items:center; gap:12px; margin-bottom:22px;
  }
  .mg-wiz-t::after{ content:''; flex:1; height:1px; background:rgba(42,33,29,0.12); }
  .mg-wiz-t .n{
    flex:none; width:30px; height:30px; border-radius:50%;
    background:linear-gradient(135deg, #C9A24B, #9C7228); color:#fff;
    font-family:inherit; font-size:15px; display:inline-flex;
    align-items:center; justify-content:center;
  }

  .mg-wiz-foot{
    display:flex; align-items:center; gap:11px; flex-wrap:wrap;
    padding:20px 36px 28px; border-top:1px solid rgba(42,33,29,0.12);
    background:#FCF8F1;
  }
  .mg-wiz-count{ font-size:14px; font-weight:800; color:#8A7A6E; margin-right:auto; }
  .mg-wiz-btn{
    padding:14px 28px; border-radius:11px; font-family:inherit;
    font-size:16px; font-weight:800; cursor:pointer; white-space:nowrap;
    transition:filter .15s ease, background .15s ease;
  }
  .mg-wiz-prev{ border:1px solid #C9A24B; background:#fff; color:#7E2536; }
  .mg-wiz-prev:hover{ background:#F6EAD1; }
  .mg-wiz-next{
    border:none; color:#fff; background:linear-gradient(135deg, #7E2536, #4A1019);
    box-shadow:0 6px 16px rgba(126,37,54,0.24);
  }
  .mg-wiz-next:hover{ filter:brightness(1.1); }
  .mg-wiz-on .form-submit{ width:auto !important; margin:0 !important; flex:none; }
  .mg-wiz-hide{ display:none !important; }
  .mg-wiz-foot .btn-delete{ width:auto !important; margin:0 !important; flex:none; padding:14px 22px !important; }

  /* 입력칸을 큼직하고 보기 좋게 (등록폼 안에서만) */
  .mg-wiz-on .form-group > label{
    display:block; font-size:15px !important; font-weight:800 !important;
    color:#2A211D !important; margin-bottom:8px !important;
  }
  .mg-wiz-on .form-group input[type=text],
  .mg-wiz-on .form-group input[type=date],
  .mg-wiz-on .form-group input[type=number],
  .mg-wiz-on .form-group input[type=email],
  .mg-wiz-on .form-group input[type=tel],
  .mg-wiz-on .form-group input:not([type]),
  .mg-wiz-on .form-group select,
  .mg-wiz-on .form-group textarea{
    width:100% !important; padding:13px 15px !important;
    font-family:inherit !important; font-size:16px !important; color:#2A211D !important;
    background:#fff !important; border:1px solid rgba(42,33,29,0.17) !important;
    border-radius:10px !important; box-sizing:border-box;
  }
  .mg-wiz-on .form-group textarea{ line-height:1.7 !important; }
  .mg-wiz-on .form-group input:focus,
  .mg-wiz-on .form-group select:focus,
  .mg-wiz-on .form-group textarea:focus{
    outline:none !important; border-color:#C9A24B !important;
    box-shadow:0 0 0 3px rgba(201,162,75,0.20) !important;
  }
  .mg-wiz-on .form-group input[type=checkbox]{ width:auto !important; padding:0 !important; }
  .mg-wiz-on .form-row{ display:flex !important; gap:16px !important; }
  .mg-wiz-on .form-row > .form-group{ flex:1 1 0 !important; min-width:0 !important; }
  @media (max-width:600px){ .mg-wiz-on .form-row{ flex-direction:column !important; gap:0 !important; } }



  /* ── 사진 올리는 칸을 작게 (2026-08-05) ── */
  .photo-upload{
    aspect-ratio:auto !important; height:120px !important;
    flex-direction:row !important; gap:10px !important;
    max-width:420px; padding:0 16px;
  }
  .photo-upload.has-photo{
    aspect-ratio:auto !important; height:120px !important;
    width:160px !important; max-width:160px; padding:0 !important;
  }
  .photo-upload.has-photo img{ object-fit:cover; }
  .slot-photo-box{
    aspect-ratio:auto !important; height:96px !important;
    max-width:340px;
  }
  .slot-photo-box.has-photo{ width:130px !important; max-width:130px; }
  @media (max-width:600px){
    .photo-upload{ max-width:none; height:110px !important; }
    .photo-upload.has-photo{ width:140px !important; height:110px !important; }
  }

  /* ── AI 도움받기 단추 (2026-08-05) ── */
  .mg-ai-btn{
    display:inline-flex; align-items:center; gap:6px;
    margin-top:9px; padding:9px 16px; border-radius:20px;
    border:1px solid #C9A24B; background:linear-gradient(135deg,#FFF9EE,#FBEFD5);
    color:#9C7228; font-family:inherit; font-size:14px; font-weight:800;
    cursor:pointer; transition:filter .15s ease;
  }
  .mg-ai-btn:hover{ filter:brightness(1.05); }
  .mg-ai-btn:disabled{ opacity:.55; cursor:progress; }
  .mg-ai-btn svg{ width:14px; height:14px; }
  .mg-ai-note{ margin-top:7px; font-size:13px; font-weight:700; color:#9C7228; }
  .mg-ai-note.bad{ color:#C0392B; }
  .mg-ai-sm{ padding:7px 13px; font-size:13px; margin-top:7px; }

  /* 검색해서 고르는 국가 칸의 제목줄 */
  .mg-ctry-head{
    padding:9px 12px 5px; font-size:12.5px; font-weight:900;
    color:#9C7228; letter-spacing:0.02em;
    background:rgba(201,162,75,0.10); position:sticky; top:0;
  }

  /* [기타] 를 고르면 나오는 나라 이름 칸 */
  .mg-ctry-row{ display:flex; gap:8px; align-items:center; }
  .mg-ctry-row > select{ flex:1 1 0; min-width:0; }
  .mg-ctry-row > .mg-ctry-etc{ flex:1 1 0; min-width:0; }
  @media (max-width:600px){
    .mg-ctry-row{ flex-wrap:wrap; }
    .mg-ctry-row > select, .mg-ctry-row > .mg-ctry-etc{ flex:1 1 100%; }
    .mg-ctry-row > .mg-ctry-etc{ margin-top:8px; }
  }

  /* 꼭 적어야 하는 칸 표시 */
  label.mg-reqlab::after{ content:' *'; color:#C0392B; font-weight:900; }
  .mg-wiz-on .form-group.mg-bad input,
  .mg-wiz-on .form-group.mg-bad select,
  .mg-wiz-on .form-group.mg-bad textarea,
  .mg-bad input, .mg-bad select, .mg-bad textarea{
    border-color:#C0392B !important; background:#FDF4F4 !important;
  }
  .mg-err{ font-size:13.5px; font-weight:700; color:#C0392B; margin-top:7px; }

  /* 마지막 확인 화면 */
  .mg-wiz-sum{
    background:#FCF8F1; border:1px solid rgba(201,162,75,0.45);
    border-radius:14px; padding:8px 22px;
  }
  .mg-wiz-sum .r{
    display:flex; gap:16px; padding:12px 0; font-size:15.5px;
    border-bottom:1px dashed rgba(42,33,29,0.13);
  }
  .mg-wiz-sum .r:last-child{ border-bottom:none; }
  .mg-wiz-sum .k{ flex:0 0 140px; color:#8A7A6E; font-weight:700; word-break:keep-all; }
  .mg-wiz-sum .v{ flex:1; min-width:0; color:#2A211D; font-weight:700; word-break:break-word; white-space:pre-wrap; }
  .mg-wiz-sum .v.non{ color:#B9AC9F; font-weight:500; }

  /* 확인 창으로 옮긴 약관 동의 줄 */
  .mg-wiz-step > .terms-row.mg-wiz-confirm{
    margin-top:18px; padding:14px 16px; border-radius:12px;
    background:#FBF6EF; border:1px solid rgba(42,33,29,0.13);
  }

  /* 유튜브 영상 재생 상자 (2026-08-05) */
  .mg-yt{
    position:relative; width:min(92vw, 900px); aspect-ratio:16/9;
    background:#000; border-radius:12px; overflow:hidden;
  }
  .mg-yt iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; display:block; }

  @media (max-width:700px){
    .mg-wiz-head{ padding:22px 20px 18px; }
    .mg-wiz-head h2{ font-size:21px !important; }
    .mg-wiz-head .sub{ font-size:14px !important; }
    .mg-wiz-dot{ font-size:11.5px; padding-top:19px; }
    .mg-wiz-dot::before{ width:11px; height:11px; }
    .mg-wiz-body{ padding:24px 20px 6px; }
    .mg-wiz-t{ font-size:18px; margin-bottom:18px; }
    .mg-wiz-foot{ padding:16px 20px 22px; gap:8px; }
    .mg-wiz-count{ flex:0 0 100%; margin:0 0 4px; font-size:13px; }
    .mg-wiz-btn{ flex:1; padding:14px 10px; font-size:15.5px; }
    .mg-wiz-on .form-submit{ flex:1 !important; }
    .mg-wiz-sum{ padding:6px 16px; }
    .mg-wiz-sum .r{ flex-direction:column; gap:4px; padding:10px 0; }
    .mg-wiz-sum .k{ flex:none; font-size:13.5px; }
  }
