/* ==========================================================
   PetSaju v6 — Sub Pages (ChatGPT 디자인, 2026-09-28)
   로드 순서: 기존 인라인 style / pet-playful.css → pet-v6.css → pet-v6-sub.css
   대상: my-pets.html / register-pet.html / community.html / my-balance.html
   모든 선택자: body.pv6 스코프 · JS 표시 상태와 기존 .on 표시 규칙 유지
   ========================================================== */

/* ===== 01. 공통 ===== */
body.pv6 {
  --line: var(--pv6-line, #DCE5F0);
  --muted: var(--pv6-muted, #5B6680);
  min-width: 0;
  min-height: 100dvh;
  color: var(--pv6-navy);
  background: linear-gradient(180deg, var(--pv6-sky) 0, var(--pv6-sky-light) 350px, #FFFDF9 720px);
}
body.pv6 .wrap {
  width: 100%;
  max-width: 1080px;
  min-width: 0;
  margin: 0 auto;
  padding:
    env(safe-area-inset-top, 0px)
    max(16px, env(safe-area-inset-right, 0px))
    max(24px, env(safe-area-inset-bottom, 0px))
    max(16px, env(safe-area-inset-left, 0px));
}
/* 사진 영역 .pcard .ph와 분리 */
body.pv6 .wrap > header.ph {
  width: 100%;
  max-width: 760px;
  min-width: 0;
  margin: 0 auto;
  padding: 22px 0 18px;
  border: 0;
  border-radius: 0;
  color: var(--pv6-navy);
  background: transparent;
  box-shadow: none;
  text-align: left;
}
body.pv6 .wrap > header.ph > .t {
  margin: 0;
  color: var(--pv6-navy);
  font-size: clamp(24px, 6vw, 28px);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.035em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
body.pv6 .wrap > header.ph > .s {
  margin: 8px 0 0;
  color: var(--pv6-muted);
  font-size: 13px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
body.pv6 #content,
body.pv6 #regForm,
body.pv6 #doneView,
body.pv6 #gateView,
body.pv6 #tabs,
body.pv6 #list {
  width: 100%;
  max-width: 760px;
  min-width: 0;
  margin-right: auto;
  margin-left: auto;
}
/* 목록·잔액의 로딩/비로그인, 커뮤니티의 빈 상태 */
body.pv6 #content .msg,
body.pv6 #content .empty,
body.pv6 #list .empty,
body.pv6 #writeBody .empty,
body.pv6 #gateView {
  margin-top: 0;
  margin-bottom: 18px;
  padding: 30px 20px;
  border: 1px solid var(--pv6-line);
  border-radius: 22px;
  color: var(--pv6-muted);
  background: #FFFFFF;
  box-shadow: var(--pv6-shadow);
  font-size: 14px;
  line-height: 1.85;
  text-align: center;
  overflow-wrap: anywhere;
}
body.pv6 #content .msg a,
body.pv6 #content .empty a,
body.pv6 #list .empty a,
body.pv6 #writeBody .empty a,
body.pv6 #gateView a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  margin-top: 10px;
  padding: 10px 16px;
  border: 1px solid #CDD9EE;
  border-radius: 12px;
  color: var(--pv6-blue);
  background: #F1F6FF;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
/* 등록·수정 공통 필드 */
body.pv6 #regForm .fld,
body.pv6 #editOvl .fld {
  min-width: 0;
  margin: 0 0 20px;
}
body.pv6 #regForm .fld > label,
body.pv6 #editOvl .fld > label {
  display: block;
  margin: 0 0 8px;
  color: var(--pv6-navy);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
body.pv6 #regForm .fld input,
body.pv6 #regForm .fld select,
body.pv6 #editOvl .fld input,
body.pv6 #editOvl .fld select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 50px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #C8D3E2;
  border-radius: 13px;
  color: var(--pv6-navy);
  background-color: #FFFFFF;
  box-shadow: none;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
}
body.pv6 #regForm .fld select,
body.pv6 #editOvl .fld select {
  padding-inline-end: 32px;
}
body.pv6 #regForm .fld input::placeholder,
body.pv6 #editOvl .fld input::placeholder {
  color: #707C91;
  opacity: 1;
}
body.pv6 #regForm .fld input:focus,
body.pv6 #regForm .fld select:focus,
body.pv6 #editOvl .fld input:focus,
body.pv6 #editOvl .fld select:focus {
  border-color: var(--pv6-blue);
}
body.pv6 #regForm input[type="date"],
body.pv6 #editOvl input[type="date"] {
  min-width: 0;
  max-width: 100%;
  appearance: none;
  -webkit-appearance: none;
}
body.pv6 #regForm input::-webkit-date-and-time-value,
body.pv6 #editOvl input::-webkit-date-and-time-value {
  min-width: 0;
  text-align: start;
}
/* 골드 주요 버튼 */
body.pv6 .wrap > .newbtn,
body.pv6 #regForm .submit,
body.pv6 #doneView #goAnalyze,
body.pv6 #content .bal .chg,
body.pv6 #edSave,
body.pv6 #writeBody #wGo {
  min-width: 0;
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid #E8AC18;
  border-radius: 16px;
  color: var(--pv6-navy);
  background: linear-gradient(180deg, var(--pv6-gold-start), var(--pv6-gold-end));
  box-shadow: 0 4px 0 var(--pv6-gold-shadow);
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}
body.pv6 .wrap > .newbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 760px;
  margin: 20px auto 28px;
}
body.pv6 .wrap > .newbtn:not(:disabled):active,
body.pv6 #regForm .submit:not(:disabled):active,
body.pv6 #doneView #goAnalyze:active,
body.pv6 #content .bal .chg:active,
body.pv6 #edSave:not(:disabled):active,
body.pv6 #writeBody #wGo:not(:disabled):active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--pv6-gold-shadow);
}
/* display는 기존 .on / style.display 규칙 유지 */
body.pv6 #regForm .err,
body.pv6 #writeBody .err {
  max-width: 100%;
  color: #A3293D;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
body.pv6 #regForm .err:not(:empty),
body.pv6 #writeBody .err:not(:empty) {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #F2CCD2;
  border-radius: 13px;
  background: #FFF3F5;
}

/* ===== 02. my-pets — 내 반려동물 ===== */
body.pv6 #content .plist {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
}
body.pv6 #content .pcard {
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--pv6-line);
  border-radius: 24px;
  color: var(--pv6-navy);
  background: #FFFFFF;
  box-shadow: var(--pv6-shadow);
}
/* header.ph와 다른, 사진 전용 .ph */
body.pv6 #content .pcard > .ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: linear-gradient(135deg, #EAF6FF, #FFF0E7);
  font-size: 56px;
  line-height: 1;
}
body.pv6 #content .pcard > .ph img {
  display: block;
  max-width: 100%;
  min-width: 0;
  object-position: center;
}
body.pv6 #content .pcard > .body {
  min-width: 0;
  margin: 0;
  padding: 16px;
}
body.pv6 #content .pcard .nm {
  margin: 0;
  color: var(--pv6-navy);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}
body.pv6 #content .pcard .meta {
  margin: 7px 0 0;
  color: var(--pv6-muted);
  font-size: 12px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
body.pv6 #content .pcard .acts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
  margin: 16px 0 0;
}
body.pv6 #content .pcard .acts button {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 10px 6px;
  border: 1px solid #CDD8E8;
  border-radius: 12px;
  color: var(--pv6-navy);
  background: #FFFFFF;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
body.pv6 #content .pcard .acts .view {
  border-color: #BCD0F6;
  color: #244FAB;
  background: #EDF4FF;
}
body.pv6 #content .pcard .acts .ed {
  background: #F5F7FA;
}
body.pv6 #content .pcard .acts .del {
  border-color: #EBCDD2;
  color: #A3293D;
  background: #FFF7F8;
}
body.pv6 #content .pcard .acts button:active {
  transform: translateY(1px);
}

/* ===== 03. register-pet — 반려동물 등록 ===== */
/* #regForm 자체의 display는 지정하지 않음 */
body.pv6 #regForm {
  margin-top: 0;
  margin-bottom: 28px;
  padding: 0;
}
body.pv6 #regForm > .card {
  width: 100%;
  min-width: 0;
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid var(--pv6-line);
  border-radius: 24px;
  color: var(--pv6-navy);
  background: #FFFFFF;
  box-shadow: var(--pv6-shadow);
}
body.pv6 #regForm #drop {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 16px 12px;
  border: 2px dashed #A6BDE8;
  border-radius: 18px;
  color: var(--pv6-navy);
  background: linear-gradient(155deg, #F1F8FF, #FFF9ED);
  text-align: center;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
body.pv6 #regForm #drop.on,
body.pv6 #regForm #drop:focus-within {
  border-color: var(--pv6-blue);
  box-shadow: inset 0 0 0 2px rgb(47 107 255 / 10%);
}
/* #dropEmpty 표시 상태는 기존 JS 유지 */
body.pv6 #regForm #dropEmpty {
  min-width: 0;
}
body.pv6 #regForm #dropEmpty .ic {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border: 1px solid #F0E1BD;
  border-radius: 14px;
  background: #FFFFFF;
  font-size: 25px;
  line-height: 1;
}
body.pv6 #regForm #dropEmpty .t1 {
  margin: 0;
  color: var(--pv6-navy);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}
body.pv6 #regForm #dropEmpty .t2 {
  margin: 6px 0 0;
  color: var(--pv6-muted);
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
body.pv6 #regForm #drop .btns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin: 14px 0 0;
}
body.pv6 #regForm #drop .btns button {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 11px 7px;
  border: 1px solid #C6D5EB;
  border-radius: 12px;
  color: var(--pv6-navy);
  background: #FFFFFF;
  box-shadow: 0 2px 0 rgb(27 42 91 / 5%);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}
body.pv6 #regForm #drop #btnAlbum {
  border-color: var(--pv6-blue);
  color: #FFFFFF;
  background: var(--pv6-blue);
}
body.pv6 #regForm #drop .btns button:active {
  transform: translateY(1px);
  box-shadow: none;
}
/* .pv-wrap / .pv-wrap.on 의 display는 기존 규칙 유지 */
body.pv6 #regForm .pv-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  margin: 0;
}
body.pv6 #regForm .pv-wrap #pv {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  margin: 0 auto;
  border-radius: 12px;
  background: #F2F5FA;
  object-fit: contain;
}
body.pv6 #regForm .pv-wrap .chg {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  margin: 12px auto 0;
  padding: 10px 16px;
  border: 1px solid #C6D5EB;
  border-radius: 12px;
  color: var(--pv6-navy);
  background: #FFFFFF;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
  transform: none;
}
body.pv6 #regForm .sect-title {
  margin: 26px 0 12px;
  padding-top: 22px;
  border-top: 1px solid #E7EDF5;
  color: var(--pv6-navy);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
/* 종류 선택: 모바일도 3열 */
body.pv6 #regForm .seg {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 5px;
  border: 1px solid #E0E7F0;
  border-radius: 16px;
  background: #F0F4F9;
}
body.pv6 #regForm .seg button {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 10px 5px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #53617C;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}
body.pv6 #regForm .seg button.sel {
  border-color: #A5B9E6;
  color: var(--pv6-navy);
  background: #FFFFFF;
  box-shadow: inset 0 -3px 0 var(--pv6-blue), 0 2px 6px rgb(27 42 91 / 7%);
  font-weight: 800;
}
/* 날짜 선택: 긴 번역을 위해 모바일 1열 */
body.pv6 #regForm .dk {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  min-width: 0;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
body.pv6 #regForm .dk button {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #CED8E7;
  border-radius: 13px;
  color: #53617C;
  background: #FFFFFF;
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  text-align: start;
  white-space: normal;
  overflow-wrap: anywhere;
}
body.pv6 #regForm .dk button.sel {
  border-color: #B29BEA;
  color: #54369D;
  background: #F4EFFF;
  box-shadow: inset 4px 0 0 var(--pv6-purple);
  font-weight: 800;
}
body.pv6 #regForm .seg button:active,
body.pv6 #regForm .dk button:active {
  filter: brightness(0.97);
}
body.pv6 #regForm .submit {
  width: 100%;
  margin: 4px 0;
}
/* .done / .done.on 의 display는 기존 규칙 유지 */
body.pv6 #doneView {
  margin-top: 0;
  margin-bottom: 28px;
  padding: 30px 20px;
  border: 1px solid #E8DCC4;
  border-radius: 24px;
  color: var(--pv6-navy);
  background: linear-gradient(155deg, #FFFFFF, #FFF9ED);
  box-shadow: var(--pv6-shadow);
  text-align: center;
}
body.pv6 #doneView .ic {
  margin: 0 0 12px;
  font-size: 44px;
  line-height: 1.2;
}
body.pv6 #doneView .t {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
body.pv6 #doneView .s {
  margin: 10px 0 22px;
  color: var(--pv6-muted);
  font-size: 14px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
body.pv6 #doneView #goAnalyze {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 0 14px;
}
body.pv6 #doneView a.sub {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #D5DEEB;
  border-radius: 13px;
  color: var(--pv6-muted);
  background: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* ===== 04. community — 커뮤니티 ===== */
/* 탭만 가로 스크롤. 페이지 전체 넘침으로 전파하지 않음 */
body.pv6 #tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
  margin-top: 18px;
  margin-bottom: 14px;
  padding: 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scroll-padding-inline: 6px;
  border: 1px solid #D7E3EF;
  border-radius: 18px;
  background: rgb(255 255 255 / 78%);
  scrollbar-width: thin;
  scrollbar-color: #C0CEE3 transparent;
}
body.pv6 #tabs button {
  flex: 0 0 auto;
  width: auto;
  min-width: 44px;
  max-width: none;
  min-height: 44px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #56657F;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}
body.pv6 #tabs button.on {
  border-color: var(--pv6-navy);
  color: #FFFFFF;
  background: var(--pv6-navy);
  box-shadow: 0 2px 5px rgb(27 42 91 / 10%);
}
body.pv6 #tabs button:active {
  filter: brightness(0.94);
}
body.pv6 .wrap > #newBtn {
  margin-top: 0;
  margin-bottom: 22px;
}
body.pv6 #list {
  margin-top: 0;
  margin-bottom: 24px;
  padding: 0;
}
body.pv6 #list > .card {
  width: 100%;
  min-width: 0;
  margin: 0 0 16px;
  padding: 18px;
  border: 1px solid var(--pv6-line);
  border-radius: 22px;
  color: var(--pv6-navy);
  background: #FFFFFF;
  box-shadow: var(--pv6-shadow);
  cursor: pointer;
  touch-action: manipulation;
}
body.pv6 #list > .card:active {
  border-color: #A5BDE8;
  background: #FAFCFF;
}
body.pv6 #list .cat,
body.pv6 #detailBox .cat {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin: 0 0 10px;
  padding: 5px 9px;
  border: 1px solid #E3D9F6;
  border-radius: 9px;
  color: #6547A7;
  background: #F5F0FF;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}
body.pv6 #list h3 {
  margin: 0 0 8px;
  color: var(--pv6-navy);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.55;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
body.pv6 #list .pv {
  margin: 0;
  color: var(--pv6-muted);
  font-size: 14px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
body.pv6 #list .card > img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
  margin: 14px 0 0;
  border-radius: 14px;
  background: #F1F5FA;
  object-fit: contain;
}
body.pv6 #list .meta,
body.pv6 #detailBox .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 12px;
  min-width: 0;
  margin: 14px 0 0;
  color: #66738A;
  font-size: 11px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
body.pv6 #list .meta > *,
body.pv6 #detailBox .meta > * {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
body.pv6 .wrap > .chat,
body.pv6 .wrap > .grp,
body.pv6 #detailBox .grp {
  width: 100%;
  max-width: 760px;
  min-width: 0;
  margin: 16px auto;
  padding: 18px;
  border: 1px solid #E5DBF5;
  border-radius: 18px;
  color: var(--pv6-muted);
  background: #F8F5FF;
  font-size: 13px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
body.pv6 .wrap > .chat {
  border-color: #ECDCC4;
  background: var(--pv6-cream);
}
body.pv6 .wrap > .chat > b,
body.pv6 .wrap > .grp > b,
body.pv6 #detailBox .grp > b {
  display: block;
  margin: 0 0 6px;
  color: var(--pv6-navy);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.65;
}
body.pv6 .wrap > .chat #chatMsg {
  display: block;
  overflow-wrap: anywhere;
}
body.pv6 .wrap > .chat a,
body.pv6 .wrap > .grp a,
body.pv6 #detailBox .grp a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  padding: 6px 0;
  color: #3159AA;
  font-weight: 700;
  line-height: 1.6;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: normal;
  overflow-wrap: anywhere;
}
/* 게시글 상세 */
body.pv6 #detailBox > img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 460px;
  background: #F1F5FA;
  object-fit: contain;
}
body.pv6 #detailBox > p {
  color: #35435F;
  font-size: 15px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
/* 댓글의 동적 div에도 긴 단어 줄바꿈 적용 */
body.pv6 #detailBox div {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
/* 댓글 입력 부모는 JS가 display:flex 지정 — display 재지정 없이 줄바꿈만 허용 */
body.pv6 #detailBox div:has(> #cmtIn) {
  flex-wrap: wrap;
  align-items: stretch;
}
/* 이 두 영역의 입력 컨트롤에만 인라인 톤 덮어쓰기 */
body.pv6 #writeBody :is(input:not([type="hidden"]):not([type="file"]), select, textarea),
body.pv6 #detailBox #cmtIn {
  max-width: 100%;
  min-height: 50px;
  border-color: #C8D3E2 !important;
  border-radius: 13px !important;
  color: var(--pv6-navy) !important;
  background-color: #FFFFFF !important;
  font-size: 16px !important;
  font-family: inherit;
  line-height: 1.6;
}
body.pv6 #writeBody :is(input:not([type="hidden"]):not([type="file"]), select, textarea) {
  width: 100%;
  min-width: 0;
}
body.pv6 #writeBody textarea {
  min-height: 180px;
  resize: vertical;
  overflow-wrap: anywhere;
}
body.pv6 #writeBody :is(input, textarea)::placeholder,
body.pv6 #detailBox #cmtIn::placeholder {
  color: #707C91;
  opacity: 1;
}
/* flex:1은 기존 인라인 유지. 160px 미만이 되면 등록 버튼을 다음 줄로 */
body.pv6 #detailBox #cmtIn {
  width: 0;
  min-width: min(160px, 100%);
}
body.pv6 #detailBox #cmtBtn {
  flex: 0 1 auto;
  width: auto;
  min-width: 72px;
  min-height: 50px;
  max-width: 100%;
  margin: 0;
  border: 1px solid var(--pv6-blue);
  border-radius: 13px;
  color: #FFFFFF;
  background: var(--pv6-blue);
  box-shadow: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}
body.pv6 #detailBox #cmtBtn:not(:disabled):active {
  background: #2457D8;
}
body.pv6 #detailBox .rp {
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  margin: 4px 0 0;
  padding: 10px 12px;
  border: 1px solid #E1E6ED;
  border-radius: 10px;
  color: #6A7487;
  background: #F7F9FC;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}
body.pv6 #writeBody {
  min-width: 0;
  overflow-wrap: anywhere;
}
body.pv6 #writeBody #wGo {
  width: 100%;
}

/* ===== 05. my-balance — 내 잔액 ===== */
body.pv6 #content .bal {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 24px 20px;
  border: 1px solid #E8DCC4;
  border-radius: 24px;
  color: var(--pv6-navy);
  background: linear-gradient(135deg, #FFFFFF, #FFF9ED);
  box-shadow: var(--pv6-shadow);
  text-align: left;
}
body.pv6 #content .bal .lb {
  margin: 0;
  color: var(--pv6-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}
body.pv6 #content .bal .amt {
  max-width: 100%;
  margin: 10px 0 22px;
  color: var(--pv6-navy);
  font-size: clamp(32px, 9vw, 42px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
body.pv6 #content .bal .btns {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  margin: 0;
}
body.pv6 #content .bal .btns a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 50px;
  max-width: 100%;
  margin: 0;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
body.pv6 #content .bal .btns .sub {
  padding: 12px 14px;
  border: 1px solid #D5DEEB;
  border-radius: 14px;
  color: #4B5D79;
  background: #FFFFFF;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}
body.pv6 #content > .note {
  margin: 16px 4px 26px;
  color: var(--pv6-muted);
  font-size: 12px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
body.pv6 #content > .sec {
  margin: 26px 0 12px;
  color: var(--pv6-navy);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.6;
  letter-spacing: -0.02em;
}
body.pv6 #content .hist {
  width: 100%;
  min-width: 0;
  margin: 0 0 24px;
  padding: 0 16px;
  border: 1px solid var(--pv6-line);
  border-radius: 20px;
  background: #FFFFFF;
  box-shadow: var(--pv6-shadow);
}
body.pv6 #content .hist .it {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  min-width: 0;
  margin: 0;
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid #E8EDF4;
}
body.pv6 #content .hist .it:last-child {
  border-bottom: 0;
}
body.pv6 #content .hist .l {
  flex: 1 1 150px;
  min-width: 0;
  max-width: 100%;
}
body.pv6 #content .hist .m {
  margin: 0;
  color: var(--pv6-navy);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
body.pv6 #content .hist .d {
  margin: 5px 0 0;
  color: var(--pv6-muted);
  font-size: 11px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
body.pv6 #content .hist .v {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  margin-inline-start: auto;
  color: var(--pv6-navy);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
body.pv6 #content .hist .v.plus {
  color: #2458BE;
}
body.pv6 #content .hist .v.minus {
  color: #8B4A35;
}

/* ===== 06. 오버레이 바텀시트 (display/visibility/z-index는 기존 .ovl/.ovl.on 유지) ===== */
body.pv6 :is(#editOvl, #detailOvl, #writeOvl) {
  position: fixed;
  inset: 0;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 100dvh;
  min-width: 0;
  margin: 0;
  padding: max(12px, env(safe-area-inset-top, 0px)) 0 0;
  overflow: hidden;
  overscroll-behavior: contain;
  background-color: rgb(15 27 61 / 52%);
}
body.pv6 :is(#editOvl, #detailOvl, #writeOvl) > .sheet {
  position: absolute;
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: 680px;
  min-width: 0;
  max-height: calc(100dvh - max(12px, env(safe-area-inset-top, 0px)));
  margin: 0 auto;
  padding:
    12px
    max(20px, env(safe-area-inset-right, 0px))
    max(24px, env(safe-area-inset-bottom, 0px))
    max(20px, env(safe-area-inset-left, 0px));
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #E0E6EE;
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  color: var(--pv6-navy);
  background: #FFFDF9;
  box-shadow: 0 -16px 48px rgb(15 27 61 / 18%);
  transform: translateY(18px);
  transition: transform 200ms ease;
}
body.pv6 :is(#editOvl, #detailOvl, #writeOvl).on > .sheet {
  transform: translateY(0);
}
/* 장식용 핸들 */
body.pv6 :is(#editOvl, #detailOvl, #writeOvl) > .sheet::before {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  margin: 0 auto 20px;
  border-radius: 99px;
  background: #CDD5E2;
}
body.pv6 :is(#editOvl, #detailOvl, #writeOvl) > .sheet h2 {
  margin: 0 0 22px;
  color: var(--pv6-navy);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}
body.pv6 #editOvl .row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  min-width: 0;
  margin: 26px 0 4px;
}
body.pv6 #editOvl .row button {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  margin: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
body.pv6 #editOvl #edCancel {
  padding: 12px 14px;
  border: 1px solid #CCD7E7;
  border-radius: 16px;
  color: var(--pv6-muted);
  background: #FFFFFF;
  box-shadow: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}
body.pv6 #detailOvl .x,
body.pv6 #writeOvl .x {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 44px;
  min-height: 46px;
  max-width: 100%;
  margin: 22px 0 0;
  padding: 11px 14px;
  border: 1px solid #D4DEEB;
  border-radius: 13px;
  color: var(--pv6-muted);
  background: #FFFFFF;
  box-shadow: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}
/* 주요 버튼 disabled 상태 */
body.pv6 #regForm #submitBtn:disabled,
body.pv6 #editOvl #edSave:disabled,
body.pv6 #writeBody #wGo:disabled,
body.pv6 #detailBox #cmtBtn:disabled,
body.pv6 .wrap > #newBtn:disabled {
  border-color: #DFE5ED;
  color: #69758A;
  background: #E9EDF3;
  box-shadow: none;
  opacity: 1;
  transform: none;
  cursor: not-allowed;
}

/* ===== 07. 반응형 ===== */
@media (min-width: 768px) {
  body.pv6 .wrap {
    padding-right: max(32px, env(safe-area-inset-right, 0px));
    padding-left: max(32px, env(safe-area-inset-left, 0px));
  }
  body.pv6 .wrap > header.ph {
    padding-top: 32px;
    padding-bottom: 24px;
  }
  body.pv6 .wrap > header.ph > .t {
    font-size: 30px;
  }
  body.pv6 .wrap > header.ph > .s {
    font-size: 14px;
  }
  body.pv6 #content .plist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.pv6 #content .pcard .acts button {
    font-size: 13px;
  }
  body.pv6 #regForm > .card {
    padding: 24px;
    border-radius: 26px;
  }
  body.pv6 #regForm #drop {
    padding: 24px;
  }
  body.pv6 #regForm #dropEmpty .t1 {
    font-size: 21px;
  }
  body.pv6 #regForm #dropEmpty .t2 {
    font-size: 14px;
  }
  body.pv6 #regForm #drop .btns {
    max-width: 460px;
    margin-right: auto;
    margin-left: auto;
    gap: 12px;
  }
  body.pv6 #regForm #drop .btns button {
    font-size: 14px;
  }
  body.pv6 #regForm .dk {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  body.pv6 #regForm .dk button {
    text-align: center;
  }
  body.pv6 #regForm .seg button {
    font-size: 15px;
  }
  body.pv6 #doneView {
    padding: 40px 32px;
  }
  body.pv6 #tabs {
    margin-top: 28px;
  }
  body.pv6 #list > .card {
    padding: 24px;
  }
  body.pv6 #list h3 {
    font-size: 20px;
  }
  body.pv6 #list .pv {
    font-size: 15px;
  }
  body.pv6 .wrap > .chat,
  body.pv6 .wrap > .grp {
    padding: 22px 24px;
  }
  body.pv6 #content .bal {
    padding: 32px;
  }
  body.pv6 #content .bal .amt {
    font-size: 44px;
  }
  body.pv6 #content .bal .btns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  body.pv6 #content .hist {
    padding-right: 24px;
    padding-left: 24px;
  }
  body.pv6 :is(#editOvl, #detailOvl, #writeOvl) {
    padding: 24px;
  }
  body.pv6 :is(#editOvl, #detailOvl, #writeOvl) > .sheet {
    top: 50%;
    bottom: auto;
    width: calc(100% - 48px);
    max-height: calc(100dvh - 48px);
    padding: 28px 24px;
    border: 1px solid #E0E6EE;
    border-radius: 26px;
    transform: translateY(calc(-50% + 18px));
  }
  body.pv6 :is(#editOvl, #detailOvl, #writeOvl).on > .sheet {
    transform: translateY(-50%);
  }
  body.pv6 :is(#editOvl, #detailOvl, #writeOvl) > .sheet::before {
    content: none;
  }
  body.pv6 #detailBox > p {
    font-size: 16px;
  }
}

/* ===== 08. 모션감소 ===== */
@media (prefers-reduced-motion: reduce) {
  body.pv6 .wrap > .newbtn,
  body.pv6 #regForm .submit,
  body.pv6 #regForm #drop,
  body.pv6 #doneView #goAnalyze,
  body.pv6 #content .bal .chg,
  body.pv6 #edSave,
  body.pv6 #writeBody #wGo,
  body.pv6 :is(#editOvl, #detailOvl, #writeOvl) > .sheet {
    transition: none;
  }
  body.pv6 .wrap > .newbtn:not(:disabled):active,
  body.pv6 #regForm .submit:not(:disabled):active,
  body.pv6 #doneView #goAnalyze:active,
  body.pv6 #content .bal .chg:active,
  body.pv6 #edSave:not(:disabled):active,
  body.pv6 #writeBody #wGo:not(:disabled):active,
  body.pv6 #content .pcard .acts button:active,
  body.pv6 #regForm #drop .btns button:active {
    transform: none;
  }
}
