*{
  box-sizing:border-box;
}

:root{
  --bg1:#06182d;
  --bg2:#0d2746;
  --primary:#3aa7ff;
  --primary2:#6ec1ff;
  --purple:#7c6cff;
  --pink:#ff6bb5;
  --text:#eef6ff;
  --sub:#b8d3ef;
  --muted:#8fb2d5;
  --card:rgba(255,255,255,.075);
  --border:rgba(255,255,255,.13);
}

html{
  min-height:100%;
  background:#06182d;
}

body{
  margin:0;
  min-height:100vh;
  font-family:-apple-system,BlinkMacSystemFont,"Noto Sans KR","Pretendard",Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at 25% 10%,rgba(58,167,255,.18),transparent 30%),
    linear-gradient(160deg,var(--bg1),var(--bg2) 60%,var(--bg1));
}

button,
select{
  font-family:inherit;
}

button{
  -webkit-tap-highlight-color:transparent;
}

.app{
  width:min(1040px,100%);
  margin:0 auto;
  padding:34px 22px 34px;
}

.hero{
  min-height:calc(100svh - 108px);
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:22px;
}

.site-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  min-height:52px;
}

.brand-row{
  display:flex;
  align-items:center;
  gap:12px;
}

.brand-mark{
  width:46px;
  height:46px;
  border-radius:15px;
  display:grid;
  place-items:center;
  background:linear-gradient(145deg,var(--primary),var(--primary2));
  color:#06182d;
  font-size:27px;
  font-weight:950;
}

.brand-name{
  font-size:20px;
  font-weight:950;
}

.brand-sub{
  margin-top:3px;
  font-size:13px;
  color:var(--muted);
}

.header-link{
  width:auto;
  padding:12px 20px;
  border-radius:999px;
  border:1px solid rgba(110,193,255,.28);
  background:rgba(255,255,255,.045);
  color:var(--text);
  font-size:15px;
  font-weight:800;
  cursor:pointer;
}

.hero-panel{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:32px;
  align-items:center;
  padding:34px;
  border-radius:30px;
  background:linear-gradient(145deg,rgba(255,255,255,.085),rgba(255,255,255,.04));
  border:1px solid var(--border);
  box-shadow:0 24px 70px rgba(0,0,0,.32);
}

.badge{
  display:inline-flex;
  padding:9px 14px;
  border-radius:999px;
  border:1px solid rgba(110,193,255,.42);
  color:var(--primary2);
  font-size:12px;
  font-weight:950;
  margin-bottom:18px;
}

h1{
  margin:0 0 16px;
  font-size:46px;
  line-height:1.12;
  letter-spacing:-1.8px;
}

.hero-copy p,
.compatibility-header p{
  margin:0 0 26px;
  color:var(--sub);
  font-size:17px;
  line-height:1.7;
}

.hero-buttons{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.primary-btn,
.secondary-btn{
  width:100%;
  border-radius:18px;
  padding:18px 20px;
  font-size:17px;
  font-weight:950;
  cursor:pointer;
  transition:.16s ease;
}

.primary-btn{
  border:0;
  background:linear-gradient(135deg,var(--primary),var(--primary2));
  color:#06182d;
  box-shadow:0 14px 34px rgba(58,167,255,.25);
}

.secondary-btn{
  border:1px solid rgba(110,193,255,.28);
  background:rgba(255,255,255,.05);
  color:var(--text);
}

.primary-btn:hover,
.secondary-btn:hover{
  transform:translateY(-1px);
}

.hero-visual{
  position:relative;
  min-height:245px;
  display:grid;
  place-items:center;
}

.visual-card{
  width:170px;
  height:205px;
  border-radius:24px;
  background:linear-gradient(145deg,#dcecff,#7aa9ff);
  box-shadow:0 24px 50px rgba(36,124,255,.28);
  transform:rotate(-4deg);
  padding:34px 28px;
}

.visual-check{
  width:42px;
  height:42px;
  border-radius:50%;
  background:#2f7dff;
  margin-bottom:22px;
  position:relative;
}

.visual-check:after{
  content:"✓";
  position:absolute;
  left:10px;
  top:2px;
  color:#fff;
  font-size:30px;
  font-weight:900;
}

.visual-lines span{
  display:block;
  height:10px;
  border-radius:999px;
  background:rgba(8,38,84,.18);
  margin:17px 0;
}

.visual-compass{
  position:absolute;
  right:60px;
  bottom:28px;
  width:118px;
  height:118px;
  border-radius:50%;
  background:linear-gradient(145deg,#1b55d8,#6d8cff);
  box-shadow:0 18px 38px rgba(36,124,255,.35);
}

.visual-compass:after{
  content:"";
  position:absolute;
  inset:18px;
  border-radius:50%;
  border:2px solid rgba(255,255,255,.35);
}

.visual-needle{
  position:absolute;
  left:50%;
  top:50%;
  width:12px;
  height:56px;
  background:#fff;
  border-radius:99px;
  transform:translate(-50%,-50%) rotate(42deg);
}

.visual-star{
  position:absolute;
  color:#6ec1ff;
  font-size:20px;
}

.visual-star-1{
  left:35px;
  top:38px;
}

.visual-star-2{
  right:48px;
  top:30px;
}

.visual-star-3{
  left:70px;
  bottom:45px;
}

.hero-stats{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
  padding-top:22px;
  border-top:1px solid rgba(255,255,255,.1);
}

.hero-stats div{
  display:flex;
  align-items:center;
  gap:14px;
  padding:18px;
  border-radius:20px;
  background:rgba(255,255,255,.055);
  border:1px solid rgba(255,255,255,.09);
}

.hero-stats i{
  width:44px;
  height:44px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:rgba(58,167,255,.2);
  color:var(--primary2);
  font-style:normal;
  font-weight:950;
}

.hero-stats strong{
  display:block;
  font-size:22px;
  color:var(--primary2);
}

.hero-stats span{
  display:block;
  font-size:13px;
  color:var(--sub);
}

.card{
  margin-top:24px;
  padding:28px;
  border-radius:28px;
  background:var(--card);
  border:1px solid var(--border);
  box-shadow:0 24px 70px rgba(0,0,0,.32);
}

.test-card,
.result-wrap{
  width:min(760px,100%);
  margin-left:auto;
  margin-right:auto;
}

.hidden{
  display:none!important;
}

.progress{
  margin-bottom:28px;
}

.progress-top{
  display:flex;
  justify-content:space-between;
  color:var(--muted);
  font-size:14px;
  margin-bottom:10px;
}

.progress-track{
  height:9px;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  overflow:hidden;
}

.progress-track i{
  display:block;
  height:100%;
  width:0;
  background:linear-gradient(90deg,var(--primary),var(--primary2));
  transition:width .25s ease;
}

.question-label{
  color:var(--primary2);
  font-size:12px;
  font-weight:950;
  letter-spacing:1px;
  margin-bottom:16px;
}

#questionText{
  min-height:84px;
  margin:0 0 24px;
  font-size:28px;
  line-height:1.4;
}

.answers{
  display:grid;
  gap:12px;
}

.answers button{
  border:1px solid rgba(255,255,255,.13);
  background:rgba(255,255,255,.06);
  color:var(--text);
  border-radius:18px;
  padding:18px;
  font-size:16px;
  font-weight:850;
  cursor:pointer;
}

.answers button:hover,
.answers button.active{
  background:rgba(58,167,255,.18);
  border-color:rgba(58,167,255,.65);
}

.small{
  color:var(--muted);
  margin:0 0 12px;
}

.result-head{
  padding:28px;
  border-radius:26px;
  background:radial-gradient(circle at 20% 20%,rgba(110,193,255,.18),transparent 38%),rgba(58,167,255,.1);
  border:1px solid rgba(110,193,255,.23);
  text-align:center;
  margin-bottom:18px;
}

.result-type{
  font-size:68px;
  font-weight:950;
  color:var(--primary2);
}

.result-title{
  margin-top:10px;
  font-size:24px;
  font-weight:900;
}

.result-summary{
  margin-top:13px;
  color:var(--sub);
  line-height:1.7;
}

.result-card,
.compatibility-box{
  margin-top:16px;
  padding:20px;
  border-radius:21px;
  background:rgba(255,255,255,.055);
  border:1px solid rgba(255,255,255,.09);
}

.result-card h3{
  margin:0 0 10px;
  color:var(--primary2);
  font-size:16px;
}

.result-card p{
  margin:0;
  color:#dbe9f7;
  line-height:1.72;
}

.mbti-bars{
  margin-top:20px;
}

.mbti-bar{
  margin-top:15px;
}

.mbti-bar-top{
  display:flex;
  justify-content:space-between;
  color:var(--sub);
  font-size:14px;
  margin-bottom:8px;
}

.mbti-track{
  height:10px;
  border-radius:999px;
  background:rgba(255,255,255,.1);
  overflow:hidden;
}

.mbti-track i{
  display:block;
  height:100%;
  background:linear-gradient(90deg,var(--primary),#7c6cff);
}

.compatibility-label{
  color:var(--primary2);
  font-size:12px;
  font-weight:950;
  margin-bottom:10px;
}

.compatibility-title{
  font-size:22px;
  font-weight:900;
  margin-bottom:18px;
}

.result-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:20px;
}

/* Compatibility Page */
.compatibility-panel{
  display:block;
  padding:34px;
}

.compatibility-header{
  display:grid;
  grid-template-columns:1.1fr .6fr;
  gap:24px;
  align-items:center;
  margin-bottom:24px;
}

.heart-visual{
  position:relative;
  min-height:150px;
  display:grid;
  place-items:center;
}

.heart{
  position:absolute;
  width:92px;
  height:92px;
  background:linear-gradient(145deg,var(--primary2),#236cff);
  transform:rotate(45deg);
  border-radius:22px;
  box-shadow:0 22px 44px rgba(58,167,255,.32);
}

.heart:before,
.heart:after{
  content:"";
  position:absolute;
  width:92px;
  height:92px;
  border-radius:50%;
  background:inherit;
}

.heart:before{
  left:-46px;
  top:0;
}

.heart:after{
  left:0;
  top:-46px;
}

.heart-main{
  left:50%;
  top:52%;
  transform:translate(-50%,-50%) rotate(45deg);
}

.heart-sub{
  width:58px;
  height:58px;
  right:48px;
  bottom:20px;
  background:linear-gradient(145deg,#b583ff,#6f55ff);
}

.heart-sub:before,
.heart-sub:after{
  width:58px;
  height:58px;
}

.heart-sub:before{
  left:-29px;
}

.heart-sub:after{
  top:-29px;
}

.compatibility-selector{
  display:grid;
  grid-template-columns:1fr 58px 1fr 220px;
  gap:14px;
  align-items:end;
  padding:18px;
  border-radius:24px;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.09);
  margin-bottom:22px;
}

.select-card label{
  display:block;
  margin-bottom:9px;
  color:var(--primary2);
  font-size:14px;
  font-weight:950;
}

.type-select{
  width:100%;
  height:58px;
  padding:0 18px;
  border-radius:16px;
  border:1px solid rgba(110,193,255,.22);
  background:#132d4d;
  color:var(--text);
  font-size:18px;
  font-weight:900;
  outline:none;
}

.swap-icon{
  height:58px;
  border-radius:50%;
  display:grid;
  place-items:center;
  border:1px solid rgba(110,193,255,.22);
  background:rgba(58,167,255,.08);
  color:var(--primary2);
  font-size:22px;
  font-weight:950;
}

.compatibility-result{
  margin-top:10px;
}

.compatibility-grid{
  display:grid;
  grid-template-columns:.95fr 1.35fr;
  gap:18px;
  align-items:stretch;
}

.score-card{
  padding:24px;
  border-radius:26px;
  background:linear-gradient(145deg,rgba(58,167,255,.10),rgba(255,255,255,.045));
  border:1px solid rgba(110,193,255,.18);
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
  min-height:330px;
}

.score-ring{
  width:190px;
  height:190px;
  border-radius:50%;
  padding:13px;
  background:conic-gradient(var(--primary) 0 76%, var(--purple) 76% 100%);
  box-shadow:0 20px 48px rgba(58,167,255,.22);
  margin-bottom:20px;
}

.score-ring-inner{
  width:100%;
  height:100%;
  border-radius:50%;
  background:#102947;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}

.score-value{
  font-size:52px;
  font-weight:950;
  color:var(--primary2);
  line-height:1;
}

.score-label{
  margin-top:10px;
  color:var(--sub);
  font-size:14px;
  font-weight:800;
}

.score-types{
  font-size:26px;
  font-weight:950;
  margin-bottom:10px;
}

.score-level{
  display:inline-flex;
  padding:8px 13px;
  border-radius:999px;
  background:rgba(58,167,255,.16);
  color:var(--primary2);
  font-size:13px;
  font-weight:950;
  margin-bottom:12px;
}

.score-summary{
  color:var(--sub);
  line-height:1.6;
  font-size:15px;
}

.analysis-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.analysis-card{
  padding:20px;
  border-radius:22px;
  background:rgba(255,255,255,.055);
  border:1px solid rgba(255,255,255,.09);
}

.analysis-icon{
  font-size:22px;
  margin-bottom:12px;
}

.analysis-card h3{
  margin:0 0 10px;
  color:var(--primary2);
  font-size:16px;
}

.analysis-card p{
  margin:0;
  color:#dbe9f7;
  line-height:1.68;
  font-size:15px;
}

.compatibility-footer{
  margin-top:18px;
}

/* Shared Footer / Legal */
.site-footer{
  width:min(1040px,100%);
  margin:0 auto;
  padding:0 22px 30px;
}

.site-footer-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:18px 0 0;
  border-top:1px solid rgba(255,255,255,.09);
  color:rgba(184,211,239,.78);
  font-size:13px;
  line-height:1.6;
}

.site-footer-links{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:10px;
}

.site-footer-links a{
  color:rgba(184,211,239,.86);
  text-decoration:none;
  font-weight:700;
}

.site-footer-links a:hover{
  color:var(--primary2);
}

.site-footer-dot{
  color:rgba(143,178,213,.55);
}

@media(max-width:900px){
  .compatibility-selector{
    grid-template-columns:1fr;
  }

  .swap-icon{
    width:58px;
    margin:0 auto;
  }

  .compatibility-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:760px){
  .app{
    padding:22px 14px 26px;
  }

  .hero{
    min-height:auto;
    justify-content:flex-start;
    gap:18px;
  }

  .hero-panel{
    grid-template-columns:1fr;
    padding:24px 18px;
    border-radius:26px;
  }

  .hero-visual{
    min-height:200px;
  }

  .hero-buttons{
    grid-template-columns:1fr;
  }

  .hero-stats{
    grid-template-columns:1fr;
  }

  .site-header{
    align-items:center;
  }

  .header-link{
    display:none;
  }

  h1{
    font-size:38px;
  }

  .card{
    margin-top:18px;
    padding:24px 18px;
  }

  .result-actions{
    grid-template-columns:1fr;
  }

  .compatibility-panel{
    padding:24px 18px;
  }

  .compatibility-header{
    grid-template-columns:1fr;
  }

  .heart-visual{
    display:none;
  }

  .analysis-grid{
    grid-template-columns:1fr;
  }

  .site-footer{
    padding:0 14px 24px;
  }

  .site-footer-inner{
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
  }

  .site-footer-links{
    justify-content:flex-start;
  }
}

@media(max-width:430px){
  .hero-visual{
    display:none;
  }

  h1{
    font-size:34px;
  }

  #questionText{
    font-size:24px;
  }

  .score-ring{
    width:160px;
    height:160px;
  }

  .score-value{
    font-size:44px;
  }
}

/* =========================================================
   1MBTI MOBILE MICRO TUNING
   First release safe patch
   - UI density only
   - No logic changes
========================================================= */

@media (max-width: 768px) {

  body {
    line-height: 1.48;
  }

  .app {
    padding: 18px 14px 24px;
  }

  .hero {
    gap: 14px;
  }

  .site-header {
    min-height: 48px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 25px;
  }

  .brand-name {
    font-size: 19px;
  }

  .brand-sub {
    font-size: 12px;
  }

  .hero-panel {
    padding: 20px 16px;
    border-radius: 24px;
    gap: 18px;
  }

  .badge {
    padding: 8px 12px;
    margin-bottom: 13px;
    font-size: 11px;
  }

  h1 {
    font-size: 31px;
    line-height: 1.15;
    letter-spacing: -1.2px;
    margin-bottom: 10px;
  }

  .hero-copy p,
  .compatibility-header p {
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.56;
  }

  .primary-btn,
  .secondary-btn {
    min-height: 48px;
    padding: 13px 16px;
    border-radius: 15px;
    font-size: 15px;
  }

  .hero-buttons {
    gap: 10px;
  }

  .hero-stats {
    gap: 10px;
    padding-top: 16px;
  }

  .hero-stats div {
    padding: 14px;
    border-radius: 17px;
  }

  .hero-stats i {
    width: 38px;
    height: 38px;
  }

  .hero-stats strong {
    font-size: 20px;
  }

  .card {
    margin-top: 16px;
    padding: 18px 16px;
    border-radius: 22px;
  }

  .progress {
    margin-bottom: 20px;
  }

  .question-label {
    margin-bottom: 12px;
  }

  #questionText {
    min-height: 64px;
    margin-bottom: 18px;
    font-size: 23px;
    line-height: 1.34;
  }

  .answers {
    gap: 10px;
  }

  .answers button {
    min-height: 48px;
    padding: 13px 14px;
    border-radius: 15px;
    font-size: 15px;
  }

  .result-head {
    padding: 22px 16px;
    border-radius: 22px;
    margin-bottom: 14px;
  }

  .result-type {
    font-size: 50px;
  }

  .result-title {
    margin-top: 8px;
    font-size: 21px;
  }

  .result-summary {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.58;
  }

  .result-card,
  .compatibility-box {
    margin-top: 12px;
    padding: 16px;
    border-radius: 18px;
  }

  .result-card h3 {
    margin-bottom: 8px;
    font-size: 15px;
  }

  .result-card p {
    font-size: 14px;
    line-height: 1.62;
  }

  .mbti-bars {
    margin-top: 16px;
  }

  .mbti-bar {
    margin-top: 12px;
  }

  .result-actions {
    gap: 10px;
    margin-top: 16px;
  }

  .compatibility-panel {
    padding: 20px 16px;
  }

  .compatibility-header {
    gap: 14px;
    margin-bottom: 18px;
  }

  .compatibility-title {
    margin-bottom: 14px;
    font-size: 20px;
  }

  .compatibility-selector {
    gap: 12px;
    padding: 15px;
    border-radius: 20px;
    margin-bottom: 16px;
  }

  .type-select {
    height: 50px;
    padding: 0 14px;
    border-radius: 14px;
    font-size: 16px;
  }

  .swap-icon {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .compatibility-grid {
    gap: 14px;
  }

  .score-card {
    min-height: auto;
    padding: 18px;
    border-radius: 22px;
  }

  .score-ring {
    width: 150px;
    height: 150px;
    padding: 10px;
    margin-bottom: 15px;
  }

  .score-value {
    font-size: 40px;
  }

  .score-types {
    font-size: 22px;
    margin-bottom: 8px;
  }

  .score-level {
    padding: 7px 11px;
    font-size: 12px;
    margin-bottom: 10px;
  }

  .score-summary {
    font-size: 14px;
    line-height: 1.56;
  }

  .analysis-grid {
    gap: 12px;
  }

  .analysis-card {
    padding: 16px;
    border-radius: 18px;
  }

  .analysis-icon {
    margin-bottom: 9px;
    font-size: 20px;
  }

  .analysis-card h3 {
    margin-bottom: 8px;
    font-size: 15px;
  }

  .analysis-card p {
    font-size: 14px;
    line-height: 1.58;
  }

  .compatibility-footer {
    margin-top: 14px;
  }

  .site-footer {
    padding: 0 14px 22px;
  }

  .site-footer-inner {
    gap: 7px;
    font-size: 12px;
  }

  section {
    margin-bottom: 16px;
  }
}

@media (max-width: 430px) {

  .app {
    padding-top: 16px;
  }

  h1 {
    font-size: 30px;
  }

  .hero-panel {
    padding: 18px 15px;
  }

  #questionText {
    font-size: 22px;
  }

  .result-type {
    font-size: 46px;
  }

  .score-ring {
    width: 142px;
    height: 142px;
  }

  .score-value {
    font-size: 38px;
  }
}
@media (max-width: 760px) {
  body {
    padding-bottom: 72px;
  }

  .app,
  .result-wrap,
  .compatibility-panel,
  .site-footer {
    padding-bottom: 88px !important;
  }
}
