/* Safetygwajang V86.5 — impact-style visual system + compact responsive polish */
:root{
  --v865-ink:#102b49;--v865-muted:#617489;--v865-blue:#2773ef;--v865-teal:#0c8586;
  --v865-line:#dbe6ed;--v865-paper:#f6f8fa;--v865-card:#fff;--v865-radius:28px;
  --v865-shadow:0 16px 42px rgba(25,69,108,.07);
}
html,body{background:linear-gradient(180deg,#f8fafb 0%,#f2f7fa 48%,#f7f8f7 100%)!important}
body{color:var(--v865-ink)!important}
main.container,.content-wrap,.law-page,.worker-shell,.mg-page,.anj-shell{width:min(100% - 30px,1500px)!important}
main.container{padding-top:18px!important;padding-bottom:38px!important}

/* Common hero language: airy pastel gradients, large rounded surfaces. */
.content-hero,.study-hero,.worker-hero,.mg-hero,.anj-intro,.news-archive-hero,.jobs-archive-hero,.archive-hero{
  border:1px solid rgba(202,219,230,.88)!important;border-radius:34px!important;
  background:
    radial-gradient(circle at 5% 8%,rgba(255,246,151,.30),transparent 24%),
    radial-gradient(circle at 92% 18%,rgba(94,169,255,.20),transparent 34%),
    linear-gradient(135deg,#ffffff 0%,#f3fbff 52%,#eef7ff 100%)!important;
  box-shadow:var(--v865-shadow)!important;
}
.content-hero,.study-hero,.worker-hero,.mg-hero,.anj-intro{padding:clamp(24px,3vw,42px)!important}
.content-hero h1,.study-hero h1,.worker-hero h1,.mg-hero h1,.anj-intro h1{color:#0c2a4a!important;letter-spacing:-.055em!important;line-height:1.12!important}
.content-hero p,.study-hero p,.worker-hero p,.mg-hero p,.anj-intro p{color:#526b82!important;line-height:1.76!important}

/* Cards echo the reference: soft pastel fields with pill-like inner controls. */
.sg-panel,.content-section,.study-sec,.worker-card,.anj-card,.mg-card,.guide-hub-card,.archive-card,.news-card,.job-card{
  border:1px solid #dde7ee!important;border-radius:26px!important;background:linear-gradient(145deg,#fff,#fbfdfe)!important;box-shadow:0 9px 26px rgba(23,67,106,.045)!important;
}
.guide-hub-grid,.v86-feature-grid,.worker-grid,.mg-grid{gap:14px!important}
.guide-hub-card:nth-child(3n+1),.worker-card:nth-child(3n+1){background:linear-gradient(145deg,#fbfeff,#edf7ff)!important}
.guide-hub-card:nth-child(3n+2),.worker-card:nth-child(3n+2){background:linear-gradient(145deg,#fff,#eefaf7)!important}
.guide-hub-card:nth-child(3n),.worker-card:nth-child(3n){background:linear-gradient(145deg,#fff,#fff9e8)!important}
.guide-hub-card:hover,.worker-card:hover,.sg-panel:hover{transform:translateY(-2px);box-shadow:0 16px 34px rgba(23,67,106,.075)!important}

/* Header dropdowns must stay in viewport. */
.sgw-context-menu{max-width:calc(100vw - 34px)!important}
.sgw-context-group[data-sgw-context-group="guide"]>.sgw-context-menu{left:auto!important;right:0!important;transform:none!important}
.sgw-context-group[data-sgw-context-group="field"]>.sgw-context-menu{left:0!important;right:auto!important;transform:none!important}
.sgw-context-menu a{border-radius:16px!important;background:#fff!important}
.sgw-context-menu a:hover{background:#edf8f7!important;transform:translateY(-1px)}

/* Archive/news/job table polish */
.news-archive-table,.jobs-archive-table,.archive-table{border-collapse:separate!important;border-spacing:0!important}
.news-archive-table thead th,.jobs-archive-table thead th,.archive-table thead th{background:#f2f7f9!important;color:#35516a!important;border-bottom:1px solid #dde7ee!important}
.news-archive-table tbody tr:hover,.jobs-archive-table tbody tr:hover,.archive-table tbody tr:hover{background:#f7fbfc!important}
.news-archive-title,.archive-position{font-weight:900!important;color:#153d63!important;text-decoration:none!important}
.news-archive-source,.archive-deadline{border-radius:999px!important;background:#eaf6f5!important;color:#397075!important}

/* Buttons: readable contrast everywhere. */
button,.btn,.btn-primary,.anj-button,.mg-btn,.worker-btn,.news-refresh,.jobs-refresh{font-weight:900!important}
.btn-primary,.anj-button.primary,.mg-btn.primary,.mg-btn.navy,.worker-btn.primary,.news-refresh,.jobs-refresh{background:#173f6d!important;border-color:#173f6d!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
.btn-primary:hover,.anj-button.primary:hover,.mg-btn.primary:hover,.mg-btn.navy:hover,.worker-btn.primary:hover,.news-refresh:hover,.jobs-refresh:hover{background:#0f3157!important;border-color:#0f3157!important}
button:disabled,.btn:disabled,.anj-button:disabled,.mg-btn:disabled{opacity:.48!important;cursor:not-allowed!important}
.news-toolbar-actions button.primary,.jobs-toolbar-actions button.primary,
.mg-role-tab.active,.mg-tab.active,.legacy-actionbar button,
.ptw-tabs button.active,.ptw-btn.primary,.ptw-btn.navy,.ptw-btn-mini.primary,
.dup-private-tab.active,#mechanical-safety-master-hub .msm-tab.active,#mechanical-safety-master-hub .msm-action.primary,
#safety-instructor-hub .si-main-tab.active,#safety-instructor-hub .si-btn.primary{
  color:#fff!important;-webkit-text-fill-color:#fff!important;text-shadow:none!important;
}

/* Anjage: reduce empty air and use the mascot as a balanced visual anchor. */
.anj-intro{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(150px,240px)!important;align-items:center!important;gap:18px!important;min-height:230px!important}
.anj-intro h1 br{display:none!important}.anj-intro h1{font-size:clamp(2rem,4vw,3.45rem)!important;max-width:820px!important}.anj-intro p{max-width:820px!important}
.anj-intro img{width:min(230px,100%)!important;max-height:210px!important;object-fit:contain!important;justify-self:center!important;filter:drop-shadow(0 18px 22px rgba(28,72,111,.13))}
.anj-card{padding:20px!important}

/* Compact, unified footer across all pages. */
.sgw-v865-footer{margin-top:30px!important;padding:0!important;background:transparent!important;border:0!important;color:#607386!important;text-align:left!important}
.sgw-v865-footer-inner{width:min(100% - 30px,1500px);margin:0 auto 22px;padding:22px 26px;border:1px solid #dce7ed;border-radius:24px;background:linear-gradient(135deg,#f6f9fb,#eef5f7);box-shadow:0 8px 24px rgba(25,67,105,.035)}
.sgw-v865-footer-top{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:22px}
.sgw-v865-footer-left{min-width:0}.sgw-v865-footer-right{display:grid;justify-items:end;gap:10px;min-width:min(100%,580px)}
.sgw-v865-footer-brand{font-weight:900;color:#173d62;font-size:.86rem}.sgw-v865-footer-brand span{margin-left:8px;color:#6c7e8f;font-size:.69rem;font-weight:750}
.sgw-v865-footer-links{display:flex;justify-content:flex-end;align-items:center;gap:6px 16px;flex-wrap:wrap}.sgw-v865-footer-links a{color:#405a70!important;text-decoration:none!important;font-size:.70rem!important;font-weight:850!important;margin:0!important}.sgw-v865-footer-links a:hover{color:#0c7e82!important}
.sgw-v865-footer-copy{margin:10px 0 0!important;max-width:760px;color:#7a8997!important;font-size:.64rem!important;line-height:1.6!important}
.sgw-v865-footer .site-visit-footer{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;width:auto!important;max-width:none!important;margin:0!important;padding:8px 0 0!important;border:0!important;border-top:1px solid #dce5e9!important;color:#667b8e!important;font-size:.65rem!important}.sgw-v865-footer .site-visit-footer i{width:1px;height:12px;background:#cfdbe2}.sgw-v865-footer .site-visit-footer small{margin-left:4px;color:#91a0ac!important;font-size:.58rem!important}

/* Security notice visible on every page including Anjage. */
.sgw-security-toast{position:fixed;left:50%;bottom:28px;z-index:30000;transform:translate(-50%,18px);opacity:0;pointer-events:none;max-width:min(92vw,520px);padding:12px 16px;border:1px solid #c9d8e2;border-radius:14px;background:rgba(18,45,72,.96);color:#fff!important;font:800 .74rem/1.45 var(--sgw-shell-font,"SG Seoul","Malgun Gothic",sans-serif);box-shadow:0 16px 36px rgba(7,32,55,.24);transition:.18s ease}.sgw-security-toast.show{opacity:1;transform:translate(-50%,0)}

/* Trim awkward whitespace, preserve natural line wrapping. */
section+section{scroll-margin-top:124px}.section-head{margin-top:12px!important;margin-bottom:12px!important}.content-wrap{gap:14px!important}.content-section{margin-top:14px!important;padding:clamp(18px,2vw,28px)!important}.content-section h2,.sg-panel h2,.worker-card h2,.anj-card h2{line-height:1.25!important;word-break:keep-all!important}.content-section p,.content-section li,.sg-panel p,.worker-card p,.anj-card p{word-break:keep-all!important}

@media(max-width:900px){
  main.container,.content-wrap,.law-page,.worker-shell,.mg-page,.anj-shell{width:calc(100% - 20px)!important}
  .content-hero,.study-hero,.worker-hero,.mg-hero,.anj-intro{border-radius:26px!important;padding:22px!important}
  .anj-intro{grid-template-columns:minmax(0,1fr) 150px!important;min-height:190px!important}.anj-intro img{max-height:150px!important}
  .sgw-v865-footer-inner{width:calc(100% - 20px);padding:18px;border-radius:20px}.sgw-v865-footer-top{grid-template-columns:1fr}.sgw-v865-footer-right{justify-items:start;min-width:0}.sgw-v865-footer-links{justify-content:flex-start;margin-top:4px}.sgw-v865-footer .site-visit-footer{justify-content:flex-start!important}
}
@media(max-width:620px){
  .anj-intro{grid-template-columns:1fr!important}.anj-intro img{width:150px!important;justify-self:end!important;margin-top:-18px!important}.anj-intro h1{font-size:2rem!important}
  .sgw-v865-footer-links{gap:8px 12px}.sgw-v865-footer-brand span{display:block;margin:3px 0 0}.sgw-v865-footer .site-visit-footer{flex-wrap:wrap!important}.sgw-profile-hero{grid-template-columns:1fr}.sgw-profile-avatar{width:68px;height:68px}.sgw-profile-section-grid{grid-template-columns:1fr}
}

/* V86.7 public member profile */
.sgw-public-profile-shell{max-width:1220px!important;padding-top:24px!important;padding-bottom:32px!important}
.sgw-public-profile-card{border:1px solid #dce7ef;border-radius:30px;background:linear-gradient(145deg,#fff,#f8fbfe);box-shadow:0 18px 48px rgba(22,65,105,.08);padding:clamp(20px,3vw,34px)}
.sgw-profile-loading{padding:60px 20px;text-align:center;color:#708497;font-weight:800}
.sgw-profile-hero{display:grid;grid-template-columns:auto minmax(0,1fr) minmax(270px,340px);gap:22px;align-items:center}
.sgw-profile-avatar{width:82px;height:82px;border-radius:24px;display:grid;place-items:center;background:linear-gradient(145deg,#e7f6f3,#edf5ff);font-size:38px;box-shadow:inset 0 0 0 1px #dce9ee}
.sgw-profile-kicker{color:#0a8587;font-size:.68rem;font-weight:900;letter-spacing:.08em}
.sgw-profile-identity h1{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:6px 0 4px!important;color:#11395f!important;font-size:clamp(1.65rem,3vw,2.35rem)!important;line-height:1.15!important}
.sgw-profile-verified{display:inline-flex;align-items:center;padding:5px 8px;border-radius:999px;background:#e4f7f0;color:#16735f;font-size:.60rem;font-weight:900}
.sgw-profile-meta{margin:0!important;color:#5f7488!important;font-size:.78rem!important;font-weight:800!important}.sgw-profile-bio{margin:12px 0 0!important;max-width:680px;color:#52697e!important;font-size:.82rem!important;line-height:1.72!important}
.sgw-profile-action-box{display:grid;gap:9px;padding:18px;border:1px solid #dbe7ee;border-radius:22px;background:linear-gradient(145deg,#f3fbf9,#eff6ff)}.sgw-profile-action-box>span{color:#0c7e82;font-size:.66rem;font-weight:900}.sgw-profile-action-box>strong{color:#173d62;font-size:.84rem;line-height:1.45}.sgw-profile-action-box>small{color:#6c8091;font-size:.62rem;line-height:1.45}
.sgw-profile-primary-action{display:flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:10px 14px;border:0;border-radius:14px;background:#153e6b;color:#fff!important;text-decoration:none!important;font:900 .76rem/1 var(--sgw-shell-font);cursor:pointer}.sgw-profile-primary-action b{color:#bfeee3}.sgw-profile-primary-action:disabled{background:#e8eef2;color:#7a8d9e!important}
.sgw-profile-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin:22px 0 0}.sgw-profile-stats>div{min-height:86px;padding:15px 16px;border:1px solid #dde7ee;border-radius:18px;background:#fff}.sgw-profile-stats span{display:block;color:#748697;font-size:.62rem;font-weight:850;margin-bottom:7px}.sgw-profile-stats strong{display:block;color:#173d62;font-size:.86rem;line-height:1.45;word-break:keep-all}
.sgw-profile-section{margin-top:24px}.sgw-profile-section h2{margin:0 0 10px!important;color:#173d62!important;font-size:.98rem!important}.sgw-profile-section-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.sgw-profile-item{padding:15px 16px;border:1px solid #e0e8ee;border-radius:16px;background:#fff}.sgw-profile-item strong{color:#173d62;font-size:.78rem;line-height:1.5}.sgw-profile-item p{margin:6px 0 0!important;color:#667b8e!important;font-size:.68rem!important;line-height:1.6!important}
.sgw-profile-empty{margin-top:22px;padding:22px;border:1px dashed #cfdee7;border-radius:18px;background:#f8fbfc}.sgw-profile-empty strong{color:#244765}.sgw-profile-empty p{margin:6px 0 0!important;color:#708397!important;font-size:.72rem!important}
.sgw-profile-chat-dialog{width:min(560px,calc(100vw - 24px))!important}
