* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-user-select: none;
  user-select: none;
}

@font-face {
  font-family: 'Oradano';
  src: url('AptToFontPath/OradanoGSRR.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  font-style: normal;
  font-display: swap;
  src: url('AptToFontPath/PretendardJPVariable.woff2') format('woff2');
}

:root {
  --bg-color: #B3A284;  
  --disk-color: #DAFE52; 
  --text-light: #000000; 
}

html, body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  background-color: #9c8c70;
  color: var(--disk-color);
  overflow: hidden;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 400px 모바일 규격 고정 프레임 */
.mobile-frame {
  width: 400px;
  max-width: 100vw;
  height: 100vh;
  background-color: var(--bg-color);
  position: relative;
  overflow: visible;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 확장 상태 시 배경 스크롤 차단 */
body.no-scroll .disk-track {
  pointer-events: none !important;
}
body.no-scroll .disk-item.is-expanded {
  pointer-events: auto !important;
}

/* 디스크 확장 상태일 때 헤더와 푸터 페이드아웃 */
body.no-scroll .site-header,
body.no-scroll .site-footer {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.3s ease;
}

/* =============================================================
   상단 & 하단 헤더/푸터
============================================================= */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 120;
  pointer-events: none;
  font-family: 'Oradano';
  color: var(--text-light);
  /* 양쪽 끝 여백을 최소화하거나 원하는 간격으로 설정 */
  padding: env(safe-area-inset-top, 0px) 24px 0 24px;
}

.header-left {
  font-family: 'Oradano';
  font-size: 34pt;
  letter-spacing: 3px;
}
.header-center {
  font-family: 'Oradano';
  font-size: 26px;
  letter-spacing: 2px;
  color: var(--text-light);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}
.header-right {
  font-family: 'Oradano';
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: auto; /* Profile 버튼 클릭 활성화 */
}

/* [추가] 우측 Profile 링크 */
.header-profile-link {
  pointer-events: auto; /* Profile 버튼 영역만 클릭 활성화 */
  text-decoration: none;
  color: antiquewhite;
  font-family: 'Oradano';
  font-size: 18px;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.header-profile-link:hover {
  opacity: 0.6;
  transform: translateY(-1px);
}

.site-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  font-family: 'Pretendard';
  font-size: 9px;
  letter-spacing: 1.5px;
  font-weight: 600;
  color: var(--text-light);
  z-index: 120;
  opacity: 0.75;
  pointer-events: none;
}

/* =============================================================
   인터랙션 스테이지 (터치 드래그 원활하도록 touch-action 해제)
============================================================= */
.stage-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: grab;
  touch-action: pan-y;
  position: relative;
  z-index: 50;
}
.stage-container:active {
  cursor: grabbing;
}

.disk-track {
  position: relative;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* =============================================================
   기본 메인 디스크 (닫힌 상태: 340px)
============================================================= */
.disk-item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 340px;
  height: 340px;
  background-color: var(--disk-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
  cursor: pointer;
  will-change: transform, width, height, opacity;
  overflow: hidden;
  transition: box-shadow 0.25s ease, opacity 0.15s linear;
  z-index: 60;
}

.disk-item:hover {
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.35);
}

.disk-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-light);
  z-index: 5;
  width: 100%;
  height: 100%;
  line-height: 1;
}

.disk-summary-category {
  font-size: 19pt;
  font-family: 'Pretendard';
  font-weight: 900;
  width: 100%;
  line-height: 1;
}

.disk-summary-title {
  font-size: 19pt;
  padding-top: 67px;
  color: var(--text-light);
  font-family: 'Pretendard';
  font-weight: 900;
  width: 100%;
}

.disk-summary-subtitle {
  font-size: 10pt;
  padding-top: 10px;  
  font-family: 'Pretendard';
  font-weight: 200;
  width: 100%;
}

.disk-summary-period {
  font-size: 7pt;
  padding-top: 45px;  
  font-family: 'Pretendard';
  font-weight: 200;
  width: 100%;
}

.disk-summary-place {
  font-size: 7pt;
  padding-top: 5px;  
  font-family: 'Pretendard';
  font-weight: 200;
  width: 100%;
}

.disk-item:not(.is-expanded) .subdisk-container {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* =============================================================
   디스크 확장 뷰 (660px 팽창)
============================================================= */
.disk-item.is-expanded {
  cursor: default;
  z-index: 150 !important;
  width: 660px !important;
  height: 660px !important;
  max-width: none !important;
  border-radius: 50% !important;
  background-color: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  opacity: 1 !important;
  transform: translate(-50%, -50%) !important;
  transition: width 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.disk-item.is-expanded .disk-summary {
  display: none !important;
}

.disk-item.is-expanded .subdisk-container {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* 축소 복귀 트랜지션 */
.disk-item.is-collapsing {
  cursor: pointer;
  z-index: 150 !important;
  width: 340px !important;
  height: 340px !important;
  max-width: 90vw !important;
  border-radius: 50% !important;
  background-color: var(--disk-color) !important;
  overflow: hidden !important;
  transition: width 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.75s ease !important;
}

.disk-item.is-collapsing .subdisk-container {
  opacity: 0 !important;
  transition: opacity 0.35s ease;
}

.disk-item.is-collapsing .disk-close-btn {
  opacity: 0 !important;
  pointer-events: none !important;
}

.disk-item.is-collapsing .disk-summary {
  display: flex !important;
  opacity: 0;
  animation: summaryFadeIn 0.4s ease 0.35s forwards;
}

@keyframes summaryFadeIn {
  to { opacity: 1; }
}

.disk-item.is-hidden-stack {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* CLOSE 버튼 */
.disk-close-btn {
  position: absolute;
  top: 70px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: var(--text-light);
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 30px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, background-color 0.2s, transform 0.2s ease;
  z-index: 180;
}

.disk-item.is-expanded .disk-close-btn {
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0.35s;
}

.disk-close-btn:hover {
  background-color: var(--text-light);
  color: var(--disk-color);
  transform: scale(1.05);
}

/* =============================================================
   서브 디스크 (Sub-disk) & 좌우 슬라이드 플라이 레이아웃
============================================================= */
.subdisk-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.subdisk-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--disk-color);
  color: var(--text-light);
  border-radius: 50%;
  box-shadow: 0 15px 70px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateX(140%) scale(0.04, 1.2);
  will-change: transform, opacity;
  z-index: 1;
}

.subdisk-item.is-active {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateX(0%) scale(1, 1);
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  z-index: 10 !important;
}

.subdisk-item.fly-out-left {
  animation: diskFlyOutLeft 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 5;
}
@keyframes diskFlyOutLeft {
  0% { transform: translateX(0%) scale(1, 1); opacity: 1; }
  100% { transform: translateX(-140%) scale(0.03, 1.2); opacity: 0; }
}

.subdisk-item.fly-in-right {
  animation: diskFlyInRight 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 10;
}
@keyframes diskFlyInRight {
  0% { transform: translateX(140%) scale(0.03, 1.2); opacity: 0; }
  100% { transform: translateX(0%) scale(1, 1); opacity: 1; }
}

.subdisk-item.fly-out-right {
  animation: diskFlyOutRight 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 5;
}
@keyframes diskFlyOutRight {
  0% { transform: translateX(0%) scale(1, 1); opacity: 1; }
  100% { transform: translateX(140%) scale(0.03, 1.2); opacity: 0; }
}

.subdisk-item.fly-in-left {
  animation: diskFlyInLeft 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 10;
}
@keyframes diskFlyInLeft {
  0% { transform: translateX(-140%) scale(0.03, 1.2); opacity: 0; }
  100% { transform: translateX(0%) scale(1, 1); opacity: 1; }
}

/* 1. 내부 콘텐츠 컨테이너 너비를 아이폰 화면 폭에 맞게 확장 */
.subdisk-inner {
  position: relative;
  z-index: 20 !important;
  width: min(92vw, 360px); /* 기존 320px 제한을 360px(또는 92vw)로 확대 */
  max-height: 75vh;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
  opacity: 1 !important;
  visibility: visible !important;
  color: var(--text-light);
  text-align: justify;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding: 10px 0;
  touch-action: pan-y;
}
.subdisk-inner::-webkit-scrollbar { 
  display: none; 
}

/* 2. 이미지 래퍼가 가로 폭을 100% 꽉 채우도록 설정 */
.subdisk-image-wrapper {
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}

/* 3. 이미지 높이 360px 유지 + 가로는 부모 너비에 꽉 맞추되 넘치지 않게 방어 */
.subdisk-image {
  width: auto;
  max-width: 100%;        /* stretch 대신 100%로 지정해 부모 폭을 뚫고 나가지 않게 방지 */
  max-height: 360px;      /* 원하시는 360px 유지 */
  height: auto;
  object-fit: contain;
  display: block;
}

.subdisk-sections-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.subdisk-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.subdisk-category {
  font-family: 'Pretendard';
  font-weight: 100;
  font-size: 9pt !important;
  letter-spacing: 1.5px;
  line-height: 1 !important;
  margin-bottom: 6px;
  opacity: 1 !important;
  text-align: center;
}

.subdisk-title {
  font-family: 'Pretendard';
  font-weight: 600;
  font-size: 11pt !important;
  line-height: 1.2 !important;
  margin-bottom: 12px;
  opacity: 1 !important;
  text-align: center;
}

.subdisk-desc {
  font-family: 'Pretendard';
  font-weight: 300;
  font-size: 9.5pt !important;
  letter-spacing: 0.1px;
  white-space: pre-line;
  opacity: 1 !important;
  width: 100%;
  text-align: justify;
}

.subdisk-inner.has-image .subdisk-desc {
  text-align: center !important;
  line-height: 1.25 !important;
}

.subdisk-pagination {
  position: absolute;
  bottom: 65px;
  display: flex;
  gap: 8px;
  z-index: 170;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #B3A284;
  transition: all 0.3s ease;
}
.dot.active {
  background: #B790FF;
  transform: scale(1.4);
}

/* =============================================================
   프로필 모달 스타일
============================================================= */
.profile-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.profile-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.profile-card {
  position: relative;
  background: #ffffff;
  color: #222222;
  max-width: 500px;
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  text-align: center;
  padding: 36px 24px;
  transform: scale(0.92) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
  
  font-family: 'Pretendard';
  font-weight: 400;
}

.profile-modal-overlay.is-open .profile-card {
  transform: scale(1) translateY(0);
}

.profile-close-btn {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #666;
  cursor: pointer;
  transition: color 0.2s ease;
}

.profile-close-btn:hover {
  color: #000;
}

.profile-header h1 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
  
}

.profile-header .education {
  color: #555555;
  margin-bottom: 20px;
}

.profile-header .univ {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 2px;
}

.profile-header .department-single-line {
  display: block;
  white-space: nowrap;
  font-size: clamp(0.7rem, 2.3vw, 0.85rem);
  letter-spacing: -0.02em;
}

.profile-image-container {
  margin: 0 auto 20px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eaeaea;
  background: #fdfdfd;
}

.profile-image-container img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.profile-footer {
  border-top: 1px solid #f0f0f0;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.profile-footer .social-links {
  display: flex;
  gap: 16px;
  font-size: 0.92rem;
  font-weight: 600;
}

.profile-footer .social-links a {
  color: #4a5568;
  text-decoration: none;
  transition: color 0.2s;
}

.profile-footer .social-links a:hover {
  color: #3182ce;
  text-decoration: underline;
}

.profile-footer .email {
  font-size: 0.88rem;
  color: #718096;
  text-decoration: none;
}

.profile-footer .email:hover {
  text-decoration: underline;
}