* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;

  display: flex;
  justify-content: center;
  align-items: center;

  background: #111;

  font-family: sans-serif;
}

/* 휴대폰 프레임 */
.phone {
  width: 340px;
  height: 700px;

  background: #000;

  border-radius: 45px;

  position: relative;

  box-shadow:
    0 0 40px rgba(0,0,0,0.6),
    inset 0 0 2px rgba(255,255,255,0.2);
}

/* 실제 화면 */
.screen {
  width: 100%;
  height: 100%;

  position: relative;

  border-radius: 35px;

  overflow: hidden;

  color: white;

  background-image: url("images/phone.webp");
  background-size: cover;
  background-position: center;
}

/* 상태바 */
.status-bar {
  width: 100%;

  padding: 16px 18px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  font-size: 14px;
  font-weight: 600;

  text-shadow: 0 0 5px rgba(0,0,0,0.7);
}

.status-icons {
  display: flex;
  gap: 8px;
}

/* 홈 화면 */
.home-screen {
  padding: 25px 20px;

  display: grid;
  grid-template-columns: repeat(4, 1fr);

  gap: 24px 16px;
}

/* 앱 */
.app {
  display: flex;
  flex-direction: column;
  align-items: center;

  cursor: pointer;
}

.app img {
  width: 62px;
  height: 62px;

  border-radius: 18px;

  object-fit: cover;

  box-shadow:
    0 4px 10px rgba(0,0,0,0.35);

  transition: 0.2s;
}

.app:hover img {
  transform: scale(1.07);
}

.app span {
  margin-top: 6px;

  font-size: 12px;

  text-shadow: 0 0 5px rgba(0,0,0,0.7);
}

.gather-page{
  position:absolute;
  inset:0;

  background:#fff;
  color:#000;

  display:none;

  overflow-y:auto;
}

.gather-page.active{
  display:block;
}

.gather-header{
  height:50px;

  display:flex;
  align-items:center;

  padding:0 15px;

  border-bottom:1px solid #eee;
}

#backBtn,
#friendBackBtn{
  border:none;
  background:none;

  font-size:24px;

  cursor:pointer;
}

.profile{
  display:flex;

  gap:15px;

  padding:15px;
}

.profile-img{
  width:80px;
  height:80px;

  border-radius:50%;

  object-fit:cover;
}

.profile-info{
  flex:1;
}

.username{
  font-size:20px;

  margin-bottom:10px;
}

.stats{
  display:flex;
  justify-content:space-between;
}

.stats strong{
  display:block;
}

.stats span{
  color:#888;
  font-size:13px;
}

.feed{
  display:grid;
  grid-template-columns:repeat(3,1fr);

  gap:2px;
}

.feed img,
.feed-item{
  width:100%;
  aspect-ratio:1;

  object-fit:cover;
}

.plus{
  background:#efefef;

  display:flex;
  align-items:center;
  justify-content:center;

  font-size:70px;
}

.home-screen.hidden{
  display:none;
}

.post-page{
  position:absolute;
  inset:0;

  background:white;
  color:black;

  display:none;

  overflow-y:auto;

  z-index:20;
}

.post-page.active{
  display:block;
}

.post-top{
  height:70px;

  display:flex;
  align-items:center;

  padding:0 15px;

  border-bottom:1px solid #eee;
}

.post-user{
  flex:1;

  display:flex;
  align-items:center;

  gap:10px;

  margin-left:10px;

  font-weight:bold;
}

.post-user img{
  width:40px;
  height:40px;

  border-radius:50%;
  object-fit:cover;
}

.menu{
  font-size:30px;
}

#postBackBtn{
  border:none;
  background:none;

  font-size:24px;

  cursor:pointer;
}

.post-image{
  width:100%;

  display:block;
}

.post-caption{
  padding:0 15px 10px;
  margin-top: 10px;
  line-height:1.5;
}

.post-comment{
  padding:0 15px 20px;
  color:#444;
}

.univ-page{
  position:absolute;
  inset:0;

  background:#f8f8f8;

  display:none;

  color:#222;

  z-index:15;
}

.univ-page.active{
  display:block;
}

.univ-header{
  height:50px;

  display:flex;
  align-items:center;

  padding:0 15px;
}

#univBackBtn{
  border:none;
  background:none;

  font-size:24px;
  cursor:pointer;
}

.univ-logo{
  padding:30px 30px 10px;

  text-align:right;

  color:#999;

  font-size:15px;
}

.univ-grid{
  padding:20px;

  display:grid;
  grid-template-columns:repeat(2,1fr);

  gap:24px;
}

.univ-card{
  background:white;

  border-radius:25px;

  padding:20px;

  display:flex;
  flex-direction:column;
  align-items:center;

  box-shadow:0 2px 10px rgba(0,0,0,0.08);

  cursor:pointer;

  transition:.2s;
}

.univ-card:hover{
  transform:translateY(-3px);
}

.univ-card img{
  width:90px;
  height:90px;

  object-fit:contain;
}

.univ-card span{
  margin-top:12px;

  font-size:18px;
  font-weight:600;
}

.bottom-logo{
  position:absolute;

  bottom:20px;
  right:25px;

  color:#aaa;

  font-size:18px;
}

.meal-page{
  position:absolute;
  inset:0;

  background:white;
  color:black;

  display:none;

  z-index:30;
}

.meal-page.active{
  display:block;
}

.meal-header{
  height:50px;

  display:flex;
  align-items:center;

  padding:0 15px;

  border-bottom:1px solid #eee;
}

#mealBackBtn{
  border:none;
  background:none;

  font-size:24px;
  cursor:pointer;
}

.meal-content{
  height:calc(100% - 50px);

  display:flex;
  justify-content:center;
  align-items:center;

  font-size:20px;
  font-weight:600;

  text-align:center;
}

.bus-page{
  position:absolute;
  inset:0;

  background:white;

  display:none;

  z-index:30;

  overflow-y:auto;
}

.bus-page.active{
  display:block;
}

.bus-header{
  height:50px;

  display:flex;
  align-items:center;

  padding:0 15px;

  border-bottom:1px solid #eee;
}

#busBackBtn{
  border:none;
  background:none;

  font-size:24px;
  cursor:pointer;
}

.bus-image{
  width:100%;
  display:block;
}

.dept-page{
  position:absolute;
  inset:0;

  background:white;
  color:black;

  display:none;

  z-index:30;

  overflow-y:auto;
}

.dept-page.active{
  display:block;
}

.dept-header{
  height:50px;

  display:flex;
  align-items:center;

  padding:0 15px;

  border-bottom:1px solid #eee;
}

#deptBackBtn{
  border:none;
  background:none;

  font-size:24px;

  cursor:pointer;
}

.dept-content{
  padding:20px;
}

.dept-item{
  margin-bottom:25px;

  padding-bottom:15px;

  border-bottom:1px solid #eee;
}

.dept-item h3{
  margin:0 0 10px 0;

  color:#163d9c;
}

.dept-item p{
  margin:5px 0;
}

.board-page{
  position:absolute;
  inset:0;

  background:white;
  color:black;

  display:none;

  z-index:30;

  overflow-y:auto;
}

.board-page.active{
  display:block;
}

.board-header{
  height:50px;

  display:flex;
  align-items:center;

  gap:10px;

  padding:0 15px;

  border-bottom:1px solid #eee;

  font-weight:bold;
}

#boardBackBtn,
#boardDetailBackBtn{
  border:none;
  background:none;

  font-size:24px;

  cursor:pointer;
}

.board-post{
  padding:15px;

  border-bottom:1px solid #eee;

  cursor:pointer;
}

.board-post:hover{
  background:#f7f7f7;
}

.board-post-title{
  font-weight:600;
}

.board-post-info{
  color:#888;

  margin-top:5px;

  font-size:13px;
}

.board-detail{
  padding:20px;
}

.board-writer{
  color:#666;

  margin-bottom:20px;
}

.board-content{
  line-height:1.6;

  margin-bottom:20px;
}

.comment{
  margin-bottom:12px;
}

.board-image{
  width:100%;

  border-radius:10px;

  margin-bottom:15px;

  display:block;
}

.post-content {
  white-space: pre-line;
  line-height: 1.8;
}

.board-content-text{
  white-space: pre-line;
  line-height: 1.8;
}

.message-page,
.chat-page{
  position:absolute;
  inset:0;

  background:white;
  color:black;

  display:none;
  z-index:40;
  

}

.message-page.active,
.chat-page.active{
  display:block;
}

.message-header{
  height:50px;
  display:flex;
  align-items:center;
  gap:10px;

  padding:0 15px;

  border-bottom:1px solid #eee;

  font-weight:bold;
}

.chat-header{
  height:50px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 15px;
  background:#b2c7da;

  color:black;

  border-bottom:1px solid #ddd;

  position:sticky;
  top:0;
  z-index:100;
}

#messageBackBtn,
#chatBackBtn{
  border:none;
  background:none;

  font-size:24px;
  cursor:pointer;
}

.chat-room{
  display:flex;
  align-items:center;

  gap:12px;

  padding:15px;

  border-bottom:1px solid #eee;

  cursor:pointer;
}

.chat-room img{
  width:40px;
  height:40px;

  border-radius:50%;

  object-fit:cover;
}

.chat-name{
  font-weight:600;
}

.chat-preview{
  color:#888;
  font-size:13px;
}

.chat-content{
  height:calc(100% - 50px);

  padding:0;

  background:#b2c7da;

  overflow-y:auto;

  scrollbar-width:none;
  -ms-overflow-style:none;
}

.chat-image{
  width:100%;
  border-radius:12px;
}

.chat-page{
  scrollbar-width:none;
  -ms-overflow-style:none;
}

.chat-page::-webkit-scrollbar{
  display:none;
}

.memo-page{
  position:absolute;
  inset:0;

  background:#fff;
  color:#000;

  display:none;

  z-index:60;

  overflow-y:auto;
}

.memo-page.active{
  display:block;
}

.memo-header{
  height:50px;

  display:flex;
  align-items:center;

  gap:10px;

  padding:0 15px;

  border-bottom:1px solid #eee;

  font-weight:bold;
}

#memoBackBtn{
  border:none;
  background:none;

  font-size:24px;

  cursor:pointer;
}

.memo-content{
  padding:20px;

  line-height:1.8;
}

.memo-content h2{
  margin-top:0;
}

.memo-image{
  width:100%;

  border-radius:12px;

  margin:15px 0;
}

.memo-content p{
  white-space: pre-line;
}


.phone-wrapper{
  width: 340px;
  height: 700px;

  display:flex;
  justify-content:center;
  align-items:center;
}