*{box-sizing:border-box}body{margin:0;background:#f5f7f7;color:#172d3a;font-family:Pretendard,"Noto Sans KR",system-ui,sans-serif}header{background:#101e2c;color:#fff;padding:17px max(18px,calc((100vw - 1000px)/2));display:flex;align-items:center;justify-content:space-between;gap:16px}header b{color:#dfbe79}header a{color:#fff;text-decoration:none;font-size:13px}main{max-width:1000px;padding:0 18px;margin:30px auto}.box{background:white;border:1px solid #dfe7e8;border-radius:14px;padding:25px;margin:18px 0;box-shadow:0 7px 25px #1234}.auth{max-width:550px;margin:55px auto}.hero{background:linear-gradient(115deg,#102a3e,#204952);color:white}.hero p{color:#d7e5e8}h1{font-size:26px}h2{font-size:20px}label{display:block;margin:11px 0;font-weight:600;font-size:14px}input,select{display:block;width:100%;margin:7px 0 14px;padding:12px;border:1px solid #b9cbd1;border-radius:8px;font:inherit;background:white}input[type=checkbox]{width:auto;margin:0}button,.btn{display:inline-block;border:0;border-radius:8px;padding:12px 18px;background:#16535c;color:white;text-decoration:none;font:inherit;cursor:pointer}button.alt,.btn.alt{background:#e7eeee;color:#18343d}button:disabled{opacity:.5;cursor:not-allowed}.actions{display:flex;gap:10px;flex-wrap:wrap}.muted{font-size:13px;color:#687983;line-height:1.7}.warn{color:#b53835}.success{color:#08745f}.notice{font-size:13px;background:#fff2d8;border-radius:8px;padding:12px;color:#705326;line-height:1.7}.grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.hidden{display:none!important}.amount{font-size:36px;color:#a88749;font-weight:850}.scroll{overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:13px}td,th{text-align:left;border-bottom:1px solid #e0e8ea;padding:9px}#status{min-height:24px;white-space:pre-wrap}.check{display:flex;align-items:center;gap:8px;font-weight:400}.cards{display:grid;gap:14px}a{color:#16676c}@media(max-width:640px){.grid{grid-template-columns:1fr}.box{padding:17px}.auth{margin:20px auto}header{padding:16px}}
/* v3.6 member overview: non-invasive, responsive */
.overview{border-color:#d8e3e6;background:linear-gradient(160deg,#fff 0%,#f7fbfb 100%)}
.overview-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.overview-heading h2{margin:3px 0 8px}.overview-heading p{margin:0;color:#657983;font-size:13px}.eyebrow{font-size:11px;letter-spacing:.2em;color:#a17d43;font-weight:750}
.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:19px}.stat{border:1px solid #e1e9eb;border-radius:12px;padding:16px;min-width:0;background:#fff}.stat span{font-size:12px;color:#607783;display:block}.stat strong{font-size:clamp(16px,2vw,24px);margin-top:9px;display:block;overflow-wrap:anywhere;color:#173e4e;font-variant-numeric:tabular-nums}.quick-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:14px}.quick-nav a{border:1px solid #d5e2e3;border-radius:9px;text-align:center;padding:12px 6px;text-decoration:none;font-weight:700;font-size:13px;color:#174954;background:#eff5f5}.quick-nav a:hover,.quick-nav a:focus-visible{background:#e0eded}.overview-disclaimer{color:#8b642c;font-size:12px;line-height:1.6;margin:16px 0 0}.box{scroll-margin-top:18px}
@media(max-width:760px){.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.quick-nav{grid-template-columns:repeat(2,minmax(0,1fr))}header nav{line-height:1.8;text-align:right}.stat{padding:13px}}
@media(max-width:380px){.overview-heading button{width:100%}.quick-nav a{font-size:12px}}

/* v3.7 mobile-only refinements: preserves login, Supabase calls and records */
html{scroll-behavior:smooth}html,body{max-width:100%;overflow-x:hidden}
button,a,input,select,textarea{touch-action:manipulation}button,a.btn{min-height:42px}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #2b9398;outline-offset:2px}
@media(max-width:760px){
 main{width:100%;max-width:100%;margin:12px auto;padding:0 12px}
 header{padding:13px 14px;flex-wrap:wrap;row-gap:8px}
 header nav{width:100%;text-align:left;display:flex;flex-wrap:wrap;gap:8px;line-height:1.6}
 header nav a{display:inline-flex;align-items:center;min-height:36px;padding:5px 9px;border-radius:7px;background:#ffffff16}
 .box{margin:12px 0;padding:17px 14px;border-radius:13px}
 .hero{padding:18px 16px}.hero h1{font-size:22px;line-height:1.35}
 h2{font-size:19px}.amount{font-size:30px}
 .overview-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px}
 .overview-heading button{padding:10px 11px;font-size:12px;white-space:normal;line-height:1.3}
 .stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:14px}
 .stat{padding:13px 10px;min-height:84px}.stat span{font-size:12px;word-break:keep-all}.stat strong{font-size:clamp(17px,4.7vw,23px)}
 .quick-nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.quick-nav a{display:flex;align-items:center;justify-content:center;min-height:47px;padding:10px 7px;line-height:1.4;word-break:keep-all}
 .grid{grid-template-columns:minmax(0,1fr)}
 .actions{gap:8px}.actions button{flex:1 1 auto}
 input,select,textarea{font-size:16px;max-width:100%;min-height:44px}
 .scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}
 .scroll table{min-width:570px}
 table{font-size:12px}td,th{padding:9px 7px}
 #logged .box>div[style*="justify-content:space-between"]{flex-wrap:wrap}
}
@media(max-width:380px){.overview-heading{grid-template-columns:1fr}.overview-heading button{width:100%}.stat{padding:11px 9px}.stat strong{font-size:17px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* v4.9: iOS Safari date input intrinsic width must not overflow signup card */
.auth,.auth form,.auth form label{min-width:0;max-width:100%;}
.auth input[type="date"]{display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box;overflow:hidden;}
@media(max-width:760px){
 .auth{width:100%;min-width:0;max-width:100%;}
 .auth form,.auth form label{width:100%;min-width:0;}
 .auth input[type="date"]{min-width:0;width:100%;max-width:100%;}
}

/* v4.11: contain iOS date picker intrinsic width within signup form */
.auth, .auth form, .auth label, .birth-label, .birth-field { min-width:0; max-width:100%; box-sizing:border-box; }
.birth-field { display:block; width:100%; overflow:hidden; border-radius:8px; }
.birth-field > input[type="date"] { display:block; box-sizing:border-box; width:100% !important; min-width:0 !important; max-width:100% !important; margin:7px 0 14px; }
.birth-field > input[type="date"]::-webkit-date-and-time-value { min-width:0; text-align:left; }
.birth-field > input[type="date"]::-webkit-datetime-edit { min-width:0; }
@media (max-width:760px) { .auth {min-width:0; width:100%;} .auth form, .birth-label, .birth-field {width:100%;} .birth-field {overflow:hidden;} }

/* v4.12: iOS Safari date control follows the same 48px height as other fields. */
.auth .birth-label { display:block; width:100%; min-width:0; }
.auth .birth-field { display:block; width:100%; max-width:100%; min-width:0; overflow:visible; border-radius:0; }
.auth .birth-field > input[type="date"] {
  display:block; width:100% !important; max-width:100% !important; min-width:0 !important;
  height:48px !important; min-height:48px !important; max-height:48px !important;
  box-sizing:border-box !important; margin:7px 0 14px !important; padding:10px 12px !important;
  font-size:16px !important; line-height:24px !important; border-radius:8px !important;
  vertical-align:middle; overflow:hidden;
}
.auth .birth-field > input[type="date"]::-webkit-date-and-time-value { min-height:0; height:24px; line-height:24px; text-align:left; }
.auth .birth-field > input[type="date"]::-webkit-datetime-edit { padding:0; line-height:24px; }
@media(max-width:760px){ .auth .birth-field > input[type="date"] { height:48px !important; min-height:48px !important; max-height:48px !important; } }

/* v4.16 signup: same width and height as neighboring fields, including iOS Safari */
.auth form{min-width:0}.auth form label,.auth form .birth-field{display:block;width:100%;max-width:100%;min-width:0;box-sizing:border-box}
.auth form input:not([type="checkbox"]),.auth form .birth-field input[type="date"]{width:100%!important;max-width:100%!important;min-width:0!important;height:48px!important;min-height:48px!important;max-height:48px!important;margin:7px 0 14px!important;padding:10px 12px!important;box-sizing:border-box!important;border-radius:8px!important;}
.auth form .birth-field{overflow:hidden}
.auth form .birth-field input[type="date"]::-webkit-date-and-time-value{min-width:0;}

/* v4.31: same floating conversation UI for signed-in members as public guest chat */
#memberChatFloat{position:fixed;right:25px;bottom:23px;z-index:80;background:linear-gradient(120deg,#33d3bf,#168fa7);border:0;color:#052a37;border-radius:60px;padding:17px 24px;font-weight:900;box-shadow:0 12px 35px #187a9e66;cursor:pointer}
#memberChatWidget{display:none;position:fixed;right:24px;bottom:86px;width:min(365px,calc(100vw - 40px));max-height:calc(100dvh - 105px);z-index:81;background:#fff;border-radius:18px;box-shadow:0 22px 60px #001a3377;overflow:hidden;flex-direction:column}
#memberChatWidget.open{display:flex}
#memberChatWidget .member-chat-head{background:#0e2b43;color:#fff;padding:17px 20px;font-size:15px;font-weight:900;display:flex;justify-content:space-between;align-items:center;flex:none}
#memberChatClose{background:transparent;border:0;color:#fff;font-size:25px;padding:0 3px;line-height:1}
#memberChatListWrap{padding:10px 15px;background:#f6f9fa;display:flex;align-items:center;gap:8px;flex:none}
#memberChatListWrap label{font-size:12px;white-space:nowrap}
#memberChatThreads{min-width:0;flex:1;font-size:12px;padding:8px;border:1px solid #cbd6df;border-radius:6px}
#memberChatNew{font-size:12px;white-space:nowrap;background:#edf4f8;color:#173750;border:1px solid #ccdae2;padding:8px;border-radius:6px}
#memberChatMessages{padding:18px;height:235px;min-height:100px;overflow-y:auto;overscroll-behavior:contain;background:#f2f7f9;flex:1}
.member-chat-bubble{white-space:pre-wrap;overflow-wrap:anywhere;margin:9px 0;padding:12px 15px;border-radius:12px;background:#fff;font-size:13px;line-height:1.6;max-width:95%;width:fit-content}
.member-chat-bubble.mine{background:#d2f5ec;margin-left:auto}
#memberChatNewFields{padding:9px 15px 2px;flex:none}#memberChatNewFields[hidden]{display:none}
#memberChatNewFields label{display:block;font-size:12px}#memberChatNewFields input{display:block;width:100%;padding:9px 12px;margin-top:5px;border:1px solid #cbd6df;border-radius:7px}
#memberChatStatus{font-size:12px;line-height:1.5;color:#8a4b3a;margin:0;padding:0 15px}#memberChatStatus:empty{display:none}
.member-chat-foot{padding:12px;display:flex;gap:7px;flex:none}.member-chat-foot input{margin:0;min-width:0;flex:1;width:100%;font-size:16px;padding:10px 12px;border:1px solid #cbd6df;border-radius:8px}.member-chat-foot button{background:#1aa99e;color:#fff;border:0;border-radius:8px;padding:10px 15px;font-weight:800}.member-chat-foot button:disabled{opacity:.5}
@media(max-width:570px){#memberChatFloat{right:12px;bottom:15px}#memberChatWidget{right:10px;bottom:74px;width:calc(100vw - 20px);max-width:420px;max-height:calc(100dvh - 105px)}#memberChatMessages{height:min(37dvh,265px)}}


/* v4.46 investment product card cleanup */
#investMember h2{margin-bottom:10px}
#investmentGrade{font-size:14px;line-height:1.6}
.invest-products{display:grid;gap:14px;margin:16px 0}
.invest-card{background:#fff;border:1px solid #dfe7e8;border-radius:14px;padding:18px;box-shadow:0 7px 25px rgba(17,34,68,.06)}
.invest-card-image-wrap{margin:-4px 0 14px}
.invest-card-image{width:100%;height:220px;display:block;object-fit:cover;border-radius:10px;border:1px solid #e1e8ea;background:#f5f7f8}
.invest-card-body{display:flex;flex-direction:column;gap:10px}
.invest-card-title{margin:0;font-size:20px;line-height:1.35;color:#102733}
.invest-meta-label{font-size:13px;color:#6e7f87;font-weight:600}
.invest-meta-value{font-size:16px;color:#1a2f39;font-weight:700;line-height:1.5}
.invest-card-desc{margin:0;color:#263a43;font-size:15px;line-height:1.85;word-break:keep-all}
.invest-divider{height:1px;background:#e6ecee;margin:2px 0}
.invest-amount-row{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}
.invest-amount-label{font-size:14px;color:#77878f}
.invest-amount-value{font-size:18px;color:#1c2329;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
.invest-card-actions{display:flex;justify-content:flex-start}
.invest-apply-btn{min-width:108px}
@media(max-width:640px){
  .invest-card{padding:16px}
  .invest-card-image{height:190px}
  .invest-card-title{font-size:18px}
  .invest-meta-value,.invest-card-desc{font-size:14px}
  .invest-amount-value{font-size:17px}
}

/* v4.51: clearly visible member balance adjustment ledger */
.vd-adjustment-panel{margin-top:20px;padding:18px;background:#f7fafa;border:1px solid #dce6e8;border-radius:12px}
.vd-adjustment-head{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:10px}
.vd-adjustment-head strong{font-size:16px;color:#153b46}
.vd-adjustment-head button{font-size:13px;padding:9px 13px;min-height:38px}
.vd-adjustment-panel .scroll{margin-top:12px}
.vd-adjustment-panel .warn{color:#a83f35;font-weight:700}
@media(max-width:640px){.vd-adjustment-panel{padding:13px}.vd-adjustment-panel table{min-width:590px}}

/* v4.54: one independent scroll window for the entire transaction history card */
#requestHistory{max-height:620px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;min-width:0}
#requestHistory .scroll{max-width:100%;overflow-x:auto}
#requestHistory table{table-layout:auto}
#requestHistory th,#requestHistory td{vertical-align:top;overflow-wrap:anywhere}
#requestHistory:focus-visible{outline:2px solid #16535c;outline-offset:3px}
@media(max-width:760px){#requestHistory{max-height:480px;scrollbar-gutter:auto}}
