/* 기존 LOVE SIGNAL 아이폰 프레임과 홈 화면의 디자인만 남긴 초기화 버전 */
:root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #172033; background: #151a29; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid #5856d6; outline-offset: 3px; }
.phone {
  width: min(390px, 100%);
  height: min(800px, calc(100dvh - 40px));
  min-height: 420px;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #f5f6fa;
  border: 7px solid #303747;
  border-radius: 42px;
  overflow: hidden;
  box-shadow: 0 24px 80px #0006;
}
.screen-layer {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: url("./images/iphone-wallpaper.jpg") center center / cover no-repeat;
}
.status {
  flex: none;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 43px;
  padding: 13px 23px 8px;
  font-size: 13px;
}
.status-time, .lock-top time { font-variant-numeric: tabular-nums; }
.status-icons { display: block; width: 65px; height: 17px; color: #172333; }
.view { flex: 1; min-height: 0; }
.home-view {
  display: flex;
  flex-direction: column;
  padding: 35px 15px 20px;
  background: transparent;
}
.app-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 20px 8px;
  margin-top: 10px;
}
.app-icon {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 7px;
  padding: 0;
  min-width: 0;
  background: none;
  border: 0;
}
.app-icon img {
  width: 55px;
  height: 55px;
  display: block;
  object-fit: cover;
  border-radius: 13px;
  box-shadow: 0 2px 7px #0002;
}
.app-icon span { font-size: 11px; color: #344760; white-space: nowrap; }
.iphone-dock {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 12px 10px;
  background: rgba(255,255,255,.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px;
}
.dock-icon { border: 0; background: none; display: flex; justify-content: center; padding: 0; }
.dock-icon img {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 13px;
  box-shadow: 0 2px 7px #0002;
}
.phone-footer {
  flex: none;
  padding: 0 65px;
  background: #f5f6fa;
}
.phone:has(.home-view:not([hidden])) .phone-footer { background: transparent; }
.home-button { display: grid; place-items: center; width: 100%; height: 32px; background: none; border: 0; }
.home-button span { display: block; width: 110px; height: 5px; border-radius: 999px; background: #273049; }

/* 각 앱은 비어 있는 화면으로 열립니다. 앱 데이터/스토리는 포함되지 않습니다. */
.empty-app-view { background: #f8f9fc; display: flex; flex-direction: column; }
.app-toolbar {
  min-height: 53px;
  display: grid;
  grid-template-columns: 70px minmax(0,1fr) 70px;
  align-items: center;
  border-bottom: 1px solid #e4e8ef;
  background: #fff;
}
.app-back { display: inline-flex; gap: 5px; align-items: center; padding: 9px 10px; border: 0; background: none; color: #007aff; }
.app-back span { font-size: 28px; font-weight: 200; line-height: .7; }
.app-toolbar h1 { margin: 0; font-size: 17px; font-weight: 650; text-align: center; }
.empty-app-body { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; padding: 28px; text-align: center; color: #7a8597; }
.empty-app-symbol { width: 58px; height: 58px; border: 2px dashed #d6dce8; border-radius: 16px; margin-bottom: 10px; }
.empty-app-body p { margin: 0; font-size: 15px; color: #46546a; font-weight: 600; }
.empty-app-body small { font-size: 12px; line-height: 1.6; }

/* 잠금화면은 디자인만 보존. DAY/메시지 알림/스토리 없음. */
.phone-lock {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 24px 35px;
  background: url("./images/iphone-wallpaper.jpg") center center / cover no-repeat;
  color: #263c57;
  text-align: center;
  touch-action: pan-y;
  user-select: none;
}
.lock-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; }
.lock-center { margin-top: 40px; }
.lock-time { font-size: 76px; font-weight: 200; letter-spacing: -4px; font-variant-numeric: tabular-nums; }
.lock-date { margin-top: 10px; font-size: 15px; }
.lock-bottom p { font-size: 13px; margin-bottom: 20px; }
#unlock-button { padding: 14px 30px; background: #ffffffb0; border: 1px solid #ffffffcc; border-radius: 30px; color: #263c57; font-size: 14px; }

/* 원래 프로젝트와 동일: 휴대폰에서는 전체화면 */
@media (max-width: 480px) {
  body { padding: 0; }
  .phone { width: 100%; height: 100dvh; min-height: 0; border: 0; border-radius: 0; }
  .status { padding-top: max(16px,env(safe-area-inset-top)); }
  .phone-footer { padding-bottom: env(safe-area-inset-bottom); }
  .phone-lock { padding-top: max(20px,env(safe-area-inset-top)); padding-bottom: max(35px,env(safe-area-inset-bottom)); }
}


/* 플레이어 닉네임 - 새 출발 화면 */
.profile-chip {
  align-self: flex-end; display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.6);
  color: #30405f; font-size: 11px; border-radius: 20px; padding: 7px 11px;
  margin-top: -13px; margin-bottom: 6px; backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); max-width: 100%;
}
.profile-dot { color: #c26c92; font-size: 16px; }
.profile-chevron { font-size: 17px; font-weight: 300; }
#home-nickname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 145px; }
.app-player-preview {
  margin-top: 12px; padding: 12px 16px; border-radius: 13px;
  background: #fff; color: #5b6880; font-size: 13px;
  overflow-wrap: anywhere; max-width: 100%;
}
.nickname-screen {
  position: absolute; inset: 0; z-index: 60; background: #171c2a; color: #f8f8fa;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 32px 24px 29px; overflow-y: auto;
}
.nickname-top { font-weight: 700; letter-spacing: .16em; font-size: 11px; color: #d2d5e4; white-space: nowrap; }
.nickname-top span { color: #e9a5c1; font-size: 18px; margin-left: 5px; }
.nickname-content { width: 100%; margin: auto 0; padding: 28px 0; }
.nickname-heart { color: #e8a9c2; font-size: 50px; line-height: 1; margin-bottom: 20px; font-weight: 200; }
.nickname-kicker { color: #b9a3bd; letter-spacing: .22em; font-size: 11px; margin: 0 0 8px; }
.nickname-screen h1 { font-size: 25px; margin: 0 0 12px; letter-spacing: -.045em; line-height: 1.3; }
.nickname-description { color: #adb4c5; font-size: 13px; line-height: 1.8; margin: 0 0 28px; }
#nickname-form label { display: block; color: #e8e8f2; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
#nickname-input {
  display: block; width: 100%; min-height: 49px; padding: 13px 15px;
  background: #272c3b; border: 1px solid #495064; color: #fff;
  border-radius: 13px; font-size: 16px; outline: none;
}
#nickname-input::placeholder { color: #798093; }
#nickname-input:focus { border-color: #e7a3c0; box-shadow: 0 0 0 2px #e7a3c028; }
.nickname-hint { font-size: 11px; color: #9099ac; margin: 8px 2px 20px; }
.nickname-preview { background: #212737; border: 1px solid #384053; border-radius: 14px; padding: 15px; display: grid; gap: 13px; }
.nickname-preview div { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.nickname-preview div + div { border-top: 1px solid #384053; padding-top: 13px; }
.nickname-preview span { font-size: 12px; color: #a8b0c1; }
.nickname-preview strong { font-size: 13px; color: #f1d2e0; overflow-wrap: anywhere; text-align: right; }
.nickname-error { color: #ffabb1; font-size: 12px; line-height: 1.5; min-height: 18px; margin: 10px 0 8px; }
.nickname-submit { display: block; width: 100%; padding: 15px; border-radius: 14px; border: 0; color: #192037; background: #e5aac3; font-weight: 700; font-size: 14px; }
.nickname-submit:disabled { opacity: .4; cursor: not-allowed; }
.nickname-footer { text-align: center; color: #7e8697; font-size: 11px; line-height: 1.6; margin: 0; }
@media (max-width: 480px) { .nickname-screen { padding: max(29px,env(safe-area-inset-top)) 25px max(22px,env(safe-area-inset-bottom)); } }

/* 게임 시작 필수 안내 */
.notice-screen { position:absolute;inset:0;z-index:70;background:#171c2a;color:#f6f5f9;display:flex;flex-direction:column;overflow-y:auto;padding:30px 25px 24px;scrollbar-width:thin; }
.notice-brand{color:#d5d5e1;font-size:11px;font-weight:700;letter-spacing:.13em}
.notice-brand span{color:#e5a4bf;font-size:18px}
.notice-content{margin:auto 0;padding:29px 0 18px}
.notice-heart{color:#df9abb;font-size:46px;text-align:center;line-height:1}
.notice-kicker{color:#a1a6b6;text-align:center;margin:20px 0 4px;letter-spacing:.2em;font-size:10px}
.notice-screen h1{margin:0;text-align:center;font-size:31px;letter-spacing:.18em}
.notice-subtitle{margin:14px 0 24px!important;text-align:center;font-size:13px!important;color:#aeb5c4!important}
.notice-rule{height:1px;background:#464b5d;margin:18px 0 22px}
.notice-content>p:not(.notice-kicker):not(.notice-subtitle){font-size:12.5px;line-height:1.9;color:#c9cbd6;margin:0 0 17px;word-break:keep-all}
.notice-content p strong{color:#f3e8ed;font-weight:650}
.notice-agreement{display:flex;gap:11px;align-items:center;justify-content:center;cursor:pointer;font-size:13px;margin:20px 0 22px;color:#e9eaf1}
.notice-agreement input{accent-color:#e6a4c1;width:19px;height:19px;flex-shrink:0;cursor:pointer}
.notice-continue{width:100%;background:#e8aac5;border:0;border-radius:13px;color:#222739;padding:16px;font-size:14px;font-weight:750}
.notice-continue:disabled{background:#4b5065;color:#9297a9;cursor:not-allowed}
.notice-footer{font-size:10px;color:#7f8799;text-align:center;line-height:1.6;margin:0}
@media(max-width:480px){.notice-screen{padding:max(27px,env(safe-area-inset-top)) 24px max(20px,env(safe-area-inset-bottom))}}

/* HOME - previous minimal patch */
#edit-nickname{display:none!important}

/* iMessage-style app: shared top status bar adopts the app's light background */
.phone:has(#app-view.ios-active:not([hidden])) .screen-layer{background:#fff;}
.phone:has(#app-view.ios-active:not([hidden])) .status{background:#f9f9fb;color:#182136;border-bottom:0;}
.phone:has(#app-view.ios-active:not([hidden])) .status-icons{color:#111827;}
.phone:has(#app-view.ios-active:not([hidden])) .phone-footer{background:#f9f9fb;}
#app-view.ios-active{display:flex;flex-direction:column;background:#fff;}
.ios-messages{display:flex;flex:1;min-height:0;flex-direction:column;background:#fff;color:#111827;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;}
.ios-msg-list,.ios-msg-thread{display:flex;flex:1;min-height:0;flex-direction:column;}
.ios-msg-list-top{display:flex;align-items:center;justify-content:space-between;padding:8px 17px 4px;min-height:41px;}
.ios-msg-link{border:0;background:none;color:#007aff;font-size:16px;padding:5px;}
.ios-msg-compose{border:0;background:none;color:#007aff;font-size:24px;line-height:1;position:relative;width:32px;height:32px;}
.ios-msg-compose span{font-size:17px;position:absolute;right:3px;top:0;}
.ios-msg-heading{font-weight:750;font-size:32px;letter-spacing:-1.1px;margin:9px 19px 10px;}
.ios-msg-search{margin:0 16px 14px;background:#e9e9ee;border-radius:10px;display:flex;align-items:center;gap:7px;padding:8px 11px;}
.ios-msg-search svg{width:16px;height:16px;stroke:#8f9298;stroke-width:2;fill:none;}
.ios-msg-search input{background:none;border:0;outline:none;font-size:16px;color:#1c1c1e;width:100%;min-width:0;}
.ios-msg-search input::placeholder{color:#8f9298;}
.ios-msg-threads{overflow-y:auto;border-top:1px solid #e5e5ea;}
.ios-msg-item{border:0;width:100%;background:#fff;display:flex;align-items:center;gap:11px;text-align:left;padding:11px 15px;min-height:78px;}
.ios-msg-avatar,.ios-contact-avatar{width:53px;height:53px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(140deg,#bfc2c9,#e8e9ed);color:#fff;font-size:26px;flex:none;}
.ios-msg-info{flex:1;min-width:0;align-self:center;}
.ios-msg-name{font-size:17px;font-weight:650;margin-bottom:3px;}
.ios-msg-preview{font-size:14px;color:#8b8b91;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ios-msg-meta{display:flex;gap:6px;align-items:center;align-self:flex-start;margin-top:10px;color:#999aa0;font-size:12px;}
.ios-msg-arrow{font-size:21px;color:#b3b3b9;}
.ios-msg-unread{width:9px;height:9px;border-radius:50%;background:#007aff;position:absolute;right:18px;margin-top:34px;}
.ios-no-conversation{padding:26px;text-align:center;color:#9b9ba0;font-size:14px;}
.ios-thread-nav{height:81px;display:grid;grid-template-columns:82px 1fr 65px;align-items:start;border-bottom:1px solid #e5e5ea;background:#f9f9fb;padding:5px 8px 7px;flex:none;}
.ios-thread-back{color:#007aff;border:0;background:none;font-size:32px;display:flex;align-items:center;line-height:1;gap:3px;padding:18px 0 0 2px;}
.ios-thread-back span{font-size:15px;}
.ios-contact-heading{font-size:12px;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#1b1b1f;white-space:nowrap;}
.ios-contact-avatar{height:43px;width:43px;font-size:20px;}
.ios-contact-chevron{color:#b5b6bd;font-size:17px;}
.ios-video-button{border:0;background:transparent;color:#007aff;display:grid;place-items:center;padding-top:23px;}
.ios-video-button svg{width:27px;height:23px;fill:none;stroke:currentColor;stroke-width:2;stroke-linejoin:round;}
.ios-thread-messages{min-height:0;flex:1;overflow-y:auto;padding:16px 12px 14px;display:flex;flex-direction:column;gap:6px;}
.ios-message-date{font-size:11px;color:#999ba4;text-align:center;padding:12px 0 16px;font-weight:550;}
.ios-bubble{max-width:82%;width:fit-content;border-radius:18px;padding:10px 13px;line-height:1.35;white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;}
.ios-incoming{align-self:flex-start;background:#e9e9eb;color:#111;border-bottom-left-radius:6px;}
.ios-outgoing{align-self:flex-end;background:#007aff;color:#fff;border-bottom-right-radius:6px;}
.ios-thread-form{flex:none;display:flex;gap:10px;align-items:center;padding:6px 10px 8px;background:#f9f9fb;}
.ios-plus{font-size:23px;font-weight:300;border:0;background:#8e8e93;color:#fff;border-radius:50%;width:28px;height:28px;line-height:1;}
.ios-compose-box{flex:1;min-width:0;border:1px solid #d1d1d6;border-radius:20px;display:flex;align-items:center;background:#fff;padding:3px 3px 3px 12px;}
.ios-compose-box input{flex:1;min-width:0;border:0;outline:0;font:inherit;font-size:15px;padding:6px 0;}
.ios-compose-box button{border:0;background:#007aff;color:#fff;font-weight:700;font-size:18px;width:25px;height:25px;border-radius:50%;}
.ios-compose-box button:disabled{background:#d1d1d6;}
/* banner floats above lockscreen, tapping jumps to thread */
.ios-notification{position:absolute;z-index:58;left:12px;right:12px;top:63px;background:rgba(242,243,248,.94);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border:1px solid rgba(255,255,255,.75);border-radius:18px;padding:11px 13px 13px;box-shadow:0 10px 28px #0003;text-align:left;color:#252735;}
.ios-notification-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px;font-size:12px;color:#727887;}
.ios-notification-app{display:flex;align-items:center;gap:6px;}
.ios-notification-app img{width:19px;height:19px;border-radius:5px;}
.ios-notification-sender{font-size:14px;font-weight:680;margin-bottom:3px;}
.ios-notification-text{font-size:14px;white-space:pre-wrap;}
.pending-notification-icon{position:absolute;z-index:12;left:60px;top:15px;}
.pending-notification-icon button{border:0;background:transparent;padding:0;position:relative;display:block;}
.pending-notification-icon img{height:19px;width:19px;border-radius:5px;display:block;}
.pending-notification-dot{position:absolute;right:-3px;top:-4px;width:7px;height:7px;border-radius:50%;background:#f3475d;border:1px solid #fff;}
.phone:has(#lock-screen:not([hidden])) .pending-notification-icon{z-index:54;}
.phone:has(#lock-screen:not([hidden])) .ios-notification{z-index:55;}
@media(max-width:480px){.ios-notification{top:max(62px,calc(env(safe-area-inset-top) + 44px));}.pending-notification-icon{top:max(14px,env(safe-area-inset-top));}}


/* 홈화면의 iOS 스타일 미확인 메시지 개수 배지 */
.dock-icon[data-app="messages"] { position: relative; overflow: visible; }
.messages-unread-badge {
  position: absolute;
  z-index: 2;
  top: -7px;
  right: max(0px, calc(50% - 36px));
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 999px;
  border: 2px solid #ecedf4;
  background: #ff3b30;
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  line-height: 17px;
  white-space: nowrap;
  text-align: center;
  box-sizing: border-box;
}
/* 상단 미확인 알림은 아이콘만 표시하며 빨간 점은 없음 */
.pending-notification-dot { display: none !important; }


/* 대화 목록 상단의 iOS 새 메시지 작성 아이콘 */
.ios-msg-compose {
  display: grid;
  place-items: center;
  position: static;
  width: 34px;
  height: 34px;
  padding: 5px;
  line-height: normal;
}
.ios-msg-compose svg {
  display: block;
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 뒤로가기는 ‹ 와 '메시지'를 같은 가로줄의 정중앙에 배치 */
.ios-thread-nav { grid-template-columns: minmax(97px, 1fr) 1.15fr minmax(58px, 1fr); }
.ios-thread-back {
  display: inline-flex;
  flex-direction: row;
  align-self: start;
  justify-self: start;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 2px;
  min-height: 41px;
  width: max-content;
  max-width: 100%;
  padding: 14px 0 0 1px;
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
}
.ios-thread-back .ios-back-chevron {
  display: inline-block;
  font-size: 37px;
  line-height: 20px;
  font-weight: 250;
  flex-shrink: 0;
  transform: translateY(-1px);
}
.ios-thread-back .ios-back-label {
  display: inline-block;
  font-size: 15px;
  line-height: 22px;
  white-space: nowrap;
}

/* iMessage 입력창 왼쪽 회색 + 버튼 중심 정렬 */
.ios-plus {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 22px;
  font-weight: 350;
  line-height: 1;
  text-align: center;
}

/* 실제 iPhone 메시지 헤더 기준 정렬 — 기존의 중복 위치 규칙을 마지막에 덮어씀 */
.ios-thread-nav {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 84px;
  align-items: center;
  height: 81px;
  padding: 3px 8px 6px;
  box-sizing: border-box;
}
.ios-thread-back {
  display: inline-flex;
  flex-direction: row;
  justify-self: start;
  align-self: center;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  min-width: 0;
  min-height: 36px;
  width: auto;
  padding: 0;
  margin: 0;
  white-space: nowrap;
  line-height: 1;
}
.ios-thread-back .ios-back-chevron {
  display: block;
  width: 11px;
  height: 22px;
  flex: 0 0 11px;
  transform: none;
  fill: none;
  stroke: #007aff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}
.ios-thread-back .ios-back-label {
  font-size: 16px;
  line-height: 22px;
  display: block;
  white-space: nowrap;
}
.ios-thread-nav .ios-contact-heading {
  justify-self: center;
  align-self: center;
}
.ios-thread-nav .ios-video-button {
  justify-self: end;
  align-self: center;
  display: grid;
  place-items: center;
  width: 34px;
  height: 36px;
  margin: 0 0 0 auto;
  padding: 0;
}
/* 글꼴의 + 기호가 한쪽으로 쏠리지 않도록 선 두 개를 SVG로 표시 */
.ios-thread-form .ios-plus {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  box-sizing: border-box;
  line-height: 0;
  background: #8e8e93;
  color: #fff;
}
.ios-plus-mark {
  display: block;
  width: 17px;
  height: 17px;
  margin: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

/* 지훈 첫 대화: iMessage 입력칸 위에 자연스러운 답장 선택지 표시 */
.ios-story-choices {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: min(38%, 210px);
  padding: 9px 12px;
  overflow-y: auto;
  background: #f8f9fb;
  border-top: 1px solid #e7e8ed;
}
.ios-story-choices[hidden] { display: none !important; }
.ios-story-option {
  width: 100%;
  border: 1px solid #c9d9f5;
  background: #fff;
  color: #0872e6;
  padding: 10px 12px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  white-space: normal;
  word-break: keep-all;
}
.ios-story-option:active { background: #eaf3ff; }

/* LOVE SIGNAL PRIVATE · dark X-like interface (fictional local simulation) */
#app-view.x-active{display:flex;flex-direction:column;min-height:0;background:#000;color:#eff3f4;}
.phone:has(#app-view.x-active:not([hidden])) .screen-layer{background:#000;}
.phone:has(#app-view.x-active:not([hidden])) .status{background:#000;color:#eff3f4;}
.phone:has(#app-view.x-active:not([hidden])) .status-icons{color:#eff3f4;}
.phone:has(#app-view.x-active:not([hidden])) .phone-footer{background:#000;}
.phone:has(#app-view.x-active:not([hidden])) .home-button span{background:#f5f5f5;}
.phone:has(#app-view.x-active:not([hidden])) .pending-notification-icon{background:#000;}
.x-app{display:flex;flex:1;min-height:0;position:relative;flex-direction:column;overflow:hidden;background:#000;color:#eff3f4;font:14px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;}
.x-app *{box-sizing:border-box;}
.x-app button,.x-app input,.x-app textarea{font:inherit;}
.x-app button{cursor:pointer;}
.x-app .x-icon{flex-shrink:0;}
.x-header{display:grid;grid-template-columns:52px minmax(0,1fr) 48px;align-items:center;flex:none;height:53px;padding:0 8px;border-bottom:1px solid #222;background:#000;}
.x-head-icon,.x-head-avatar{width:42px;height:42px;border:0;background:none;color:#eff3f4;display:grid;place-items:center;padding:0;}
.x-head-avatar .x-avatar{width:34px;height:34px;}
.x-header-title{font-size:20px;font-weight:750;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.x-avatar{width:39px;height:39px;border-radius:50%;flex-shrink:0;background:#30363d;color:#f4f7fa;display:grid;place-items:center;font-size:17px;font-weight:650;overflow:hidden;}
.x-avatar.self{background:#314753;}
.x-avatar img{width:100%;height:100%;object-fit:cover;}
.x-tabs{display:flex;flex:none;min-height:47px;border-bottom:1px solid #262626;}
.x-tab{flex:1;position:relative;min-width:0;background:none;border:0;color:#8b98a5;font-weight:650;padding:12px 5px;}
.x-tab.on{color:#f1f5f8;}
.x-tab.on:after{content:"";display:block;position:absolute;bottom:0;height:4px;background:#1d9bf0;left:20%;right:20%;border-radius:8px;}
.x-scroll{flex:1;overflow-y:auto;min-height:0;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#333 #000;}
.x-pull-hint{font-size:11px;color:#697781;text-align:center;padding:6px;border-bottom:1px solid #191919;}
.x-post{display:flex;align-items:flex-start;gap:9px;border-bottom:1px solid #252525;padding:12px 11px 9px;min-width:0;}
.x-post-avatar{border:0;background:none;padding:0;flex:none;}
.x-post-content{flex:1;min-width:0;}
.x-post-meta{display:flex;align-items:center;gap:4px;min-width:0;}
.x-author{font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:115px;color:#f1f5f8;border:0;background:none;padding:0;text-align:left;}
.x-subtle{font-size:12px;color:#828d99;}
.x-post-meta .x-subtle{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:0;}
.x-post-more{padding:2px;background:none;border:0;color:#81909c;}
.x-post-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.5;padding:5px 0 10px;}
.x-post-image{width:100%;max-height:280px;object-fit:contain;border-radius:15px;border:1px solid #30363d;margin-bottom:8px;background:#080808;}
.x-actions{display:flex;align-items:center;justify-content:space-between;gap:4px;margin-top:3px;color:#82909d;}
.x-action{background:none;border:0;padding:6px 0;display:inline-flex;align-items:center;gap:5px;font-size:11px;color:inherit;min-width:38px;}
.x-action .x-icon{height:18px;width:18px;}
.x-action.selected.like{color:#f91880;}
.x-action.selected.repost{color:#00ba7c;}
.x-bottom{height:53px;flex:none;display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid #282828;background:#000;z-index:4;}
.x-nav-btn{border:0;position:relative;background:none;color:#eff3f4;display:grid;place-items:center;padding:0;}
.x-nav-btn .x-icon{height:25px;width:25px;}
.x-nav-btn.current{color:#1d9bf0;}
.x-small-dot{position:absolute;top:6px;left:calc(50% + 8px);width:7px;height:7px;background:#1d9bf0;border-radius:50%;}
.x-float-compose{position:absolute;right:17px;bottom:67px;width:53px;height:53px;z-index:5;border:0;border-radius:50%;background:#1d9bf0;color:#fff;display:grid;place-items:center;box-shadow:0 5px 12px #0009;}
.x-float-compose .x-icon{width:27px;height:27px;}
.x-section{margin:0;padding:13px 14px;font-size:18px;}
.x-empty{color:#85919c;font-size:13px;text-align:center;white-space:pre-line;padding:48px 24px;}
.x-search-box{display:flex;align-items:center;gap:8px;border-radius:28px;background:#202327;margin:8px 12px 12px;padding:11px 13px;color:#8b98a5;}
.x-search-box input{background:none;border:0;outline:none;color:#f2f4f5;min-width:0;width:100%;}
.x-trend{width:100%;padding:15px 16px;border:0;border-bottom:1px solid #222;text-align:left;background:none;color:#eff3f4;display:flex;flex-direction:column;gap:4px;font-weight:650;}
.x-trend div:first-child,.x-trend div:last-child{font-size:12px;color:#85919c;font-weight:400;}
.x-notification{display:flex;width:100%;gap:14px;align-items:center;text-align:left;padding:16px;background:none;color:#eff3f4;border:0;border-bottom:1px solid #222;}
.x-dm-row{display:flex;width:100%;gap:12px;align-items:center;text-align:left;padding:15px;background:none;color:#eff3f4;border:0;border-bottom:1px solid #252525;}
.x-dm-row>.x-icon{transform:rotate(180deg);margin-left:auto;color:#788692;}
.x-dm-text{display:flex;flex:1;flex-direction:column;gap:3px;min-width:0;}
.x-dm-text .x-subtle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.x-dm-thread{padding:14px;display:flex;flex-direction:column;gap:9px;}
.x-dm-bubble{width:fit-content;max-width:81%;border-radius:18px 18px 18px 4px;padding:10px 13px;background:#24282d;white-space:pre-wrap;overflow-wrap:anywhere;}
.x-dm-bubble.mine{background:#1d9bf0;color:white;align-self:flex-end;border-radius:18px 18px 4px 18px;}
.x-dm-form{flex:none;display:flex;gap:7px;align-items:center;border-top:1px solid #24282d;padding:9px 12px;background:#000;}
.x-dm-form input{flex:1;min-width:0;border:1px solid #3b454b;border-radius:20px;padding:10px 12px;outline:none;background:#14171a;color:#f1f5f8;}
.x-send,.x-primary{background:#1d9bf0;border:0;color:white;border-radius:22px;font-weight:700;padding:11px 16px;}
.x-newdm{padding:20px;display:flex;flex-direction:column;gap:13px;}
.x-newdm input{padding:12px;background:#1b1f23;color:#fff;border:1px solid #38424a;border-radius:9px;}
.x-cover{height:103px;background:linear-gradient(130deg,#25394c,#456b7c);background-position:center;background-size:cover;}
.x-profile-top{display:flex;justify-content:space-between;align-items:end;margin:-26px 15px 10px;position:relative;}
.x-profile-top .x-avatar{height:72px;width:72px;border:3px solid #000;font-size:32px;}
.x-outline{background:none;border:1px solid #5f6970;color:#f5f5f5;border-radius:22px;padding:9px 15px;font-weight:700;}
.x-profile-name{font-size:21px;font-weight:750;margin:0;padding:0 16px;}
.x-profile-page>.x-subtle,.x-profile-bio,.x-follows{padding:5px 16px;}
.x-profile-bio{white-space:pre-wrap;overflow-wrap:anywhere;}
.x-follows{font-size:12px;color:#88949f;margin:8px 0 16px;}
.x-edit-profile{padding:13px;display:flex;flex-direction:column;gap:14px;}
.x-edit-field{display:flex;flex-direction:column;gap:5px;color:#9da7b0;font-size:13px;}
.x-edit-field input,.x-edit-field textarea{color:#f1f5f8;background:#171b1f;border:1px solid #3a464f;padding:12px;border-radius:8px;outline:none;}
.x-edit-field textarea{resize:vertical;min-height:90px;}
.x-upload-wrap{display:inline-flex;align-items:center;}
.x-image-upload{border:0;background:none;color:#1d9bf0;display:flex;align-items:center;gap:7px;padding:7px 0;white-space:nowrap;}
.x-compose-row{display:flex;gap:11px;min-height:0;flex:1;padding:18px 13px;overflow-y:auto;align-items:flex-start;}
.x-compose-row>.x-avatar{flex-shrink:0;}
.x-compose-form{display:flex;flex-direction:column;gap:15px;min-width:0;width:100%;height:100%;}
.x-compose-form textarea{border:0;outline:0;resize:vertical;background:none;color:#f5f5f5;font-size:17px;min-height:165px;width:100%;}
.x-compose-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid #222;padding:9px 0;}
.x-counter{color:#8694a0;font-size:12px;white-space:nowrap;}
.x-compose-form>.x-primary{align-self:flex-end;}
.x-image-preview{width:100%;max-height:210px;object-fit:contain;border:1px solid #31363e;border-radius:12px;}
.x-clear-image{border:0;background:none;color:#f91880;align-self:flex-start;display:flex;gap:4px;align-items:center;}
.x-reply-row{display:flex;gap:8px;padding:12px;border-bottom:1px solid #222;}
.x-reply-row>div:last-child{padding-top:7px;overflow-wrap:anywhere;}
.x-settings{padding:20px;}
.x-settings p{color:#98a2ac;line-height:1.7;}
.x-toast{position:absolute;z-index:10;bottom:70px;left:12%;width:76%;background:#1d9bf0;color:#fff;text-align:center;border-radius:22px;padding:10px 14px;font-size:12px;box-shadow:0 4px 16px #0007;pointer-events:none;}

/* 프로필 탭: 각 글자를 파란 활성 밑줄의 정중앙 위로 맞춤 */
.x-profile-page > .x-tabs { padding-left: 0; }
.x-profile-page > .x-tabs > .x-tab {
  text-align: center;
}

/* 세린이 보낸 X 네이티브 공유 미리보기 — 누르면 게임 X 게시글 상세로 이동 */
.ios-x-share-card{display:block;text-align:left;align-self:flex-start;max-width:min(295px,90%);width:280px;background:#f2f2f7;border:1px solid #dce0e7;border-radius:16px;padding:0;overflow:hidden;color:#111827;cursor:pointer;margin:7px 0 12px 2px;}
.ios-x-share-platform{font-size:11px;color:#646b7e;padding:9px 12px 7px;border-bottom:1px solid #d9dce4;}
.ios-x-share-content{display:flex;flex-direction:column;gap:0;}
.ios-x-share-image{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;}
.ios-x-share-excerpt{padding:10px 12px 12px;font-size:12px;line-height:1.55;}
.ios-x-share-excerpt strong{display:block;font-size:12px;}
.ios-x-share-excerpt p{margin:4px 0;}
.ios-x-share-excerpt small{display:block;color:#737783;}
.x-story-person{padding:0 16px 13px;margin-top:-29px;position:relative;}
.x-story-person .x-avatar{border:3px solid #000;width:62px;height:62px;font-size:25px;margin-bottom:9px;}
.x-leaker-bio{color:#eee;margin-top:12px;font-size:14px;}
.x-person-postheading{border-bottom:1px solid #2b2b2b;text-align:center;padding:15px 10px;font-weight:700;}

/* LOVE SIGNAL · iPhone-inspired Notes: full-screen yellow-accented native-style interface */
.phone:has(#app-view.notes-active:not([hidden])) .screen-layer{background:#f5f5f9}
.phone:has(#app-view.notes-active:not([hidden])) .status{background:#f8f8fa;color:#11131a}
.phone:has(#app-view.notes-active:not([hidden])) .status-icons{color:#11131a}
.phone:has(#app-view.notes-active:not([hidden])) .phone-footer{background:#f8f8fa}
.phone:has(#app-view.notes-active:not([hidden])) .home-button span{background:#232838}
#app-view.notes-active{background:#f5f5f9;display:flex;flex-direction:column;min-height:0;color:#16171d}
.notes-app{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;background:#f5f5f9;color:#16171d;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.notes-app button{border:0;background:transparent;-webkit-tap-highlight-color:transparent}
.notes-scroll{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
.notes-nav{min-height:52px;flex:none;display:grid;grid-template-columns:minmax(94px,1fr) auto minmax(94px,1fr);align-items:center;padding:2px 14px 0;background:#f8f8fa}
.notes-nav-left{display:flex;align-items:center;justify-content:flex-start;min-width:0}
.notes-nav-right{display:flex;align-items:center;justify-content:flex-end;min-width:0}
.notes-nav-title{font-weight:650;font-size:16px;text-align:center}
.notes-link-btn,.notes-nav-action,.notes-icon-btn{color:#cb9115!important;white-space:nowrap}
.notes-link-btn{display:inline-flex;gap:1px;align-items:center;font-size:16px;padding:8px 0}
.notes-link-btn svg{width:18px;height:18px}
.notes-nav-action{padding:10px 2px;font-size:15px}
.notes-icon-btn{width:34px;height:36px;display:inline-grid;place-items:center;flex-shrink:0}
.notes-icon-btn svg{width:22px;height:22px}
.notes-content{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:10px 15px 24px}
.notes-title{font-size:31px;font-weight:760;letter-spacing:-1.1px;margin:8px 2px 19px;color:#16171d}
.notes-group{border-radius:12px;background:#fff;overflow:hidden;margin-bottom:19px}
.notes-folder-row{display:flex;align-items:center;width:100%;height:51px;padding:0 13px;gap:12px;border-bottom:1px solid #e8e8ea!important;text-align:left;color:#171923;font-size:16px}
.notes-folder-row:last-child,.notes-item:last-child{border-bottom:0!important}
.notes-folder-row>svg:first-child{color:#d29b20;fill:#ffcc56;stroke:#e9ad32;width:24px;height:24px}
.notes-folder-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.notes-folder-count{color:#8a8a93;font-size:14px}
.notes-folder-row>svg:last-child{color:#c7c7cc;width:17px;height:17px}
.notes-footer-row{height:52px;flex:none;display:flex;justify-content:space-between;align-items:center;padding:0 19px;background:#f7f7fa;border-top:1px solid #e8e9ef}
.notes-footer-count{font-size:12px;color:#929297;flex:1;text-align:center}
.notes-search{height:36px;border-radius:11px;background:#e8e8ed;display:flex;align-items:center;gap:8px;padding:0 11px;margin:0 0 18px;color:#8e8e93}
.notes-search svg{width:18px;height:18px}
.notes-search input{background:transparent;border:0;outline:0;width:100%;min-width:0;font:inherit;font-size:15px;color:#171923}
.notes-search input::placeholder{color:#8d8e96}
.notes-list-group{margin-bottom:0}
.notes-item{display:flex;align-items:center;gap:10px;min-height:75px;width:100%;padding:12px 15px!important;border-bottom:1px solid #e8e8ea!important;text-align:left;color:#191920}
.notes-item-main{min-width:0;flex:1;display:flex;flex-direction:column;gap:4px}
.notes-item-title{font-size:16px;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.notes-item-title svg{width:12px;height:12px;display:inline-block;margin-right:5px;color:#d19a25}
.notes-item-subtitle{display:flex;gap:7px;align-items:center;color:#91929b;font-size:13px;min-width:0}
.notes-item-date{white-space:nowrap;color:#787982}
.notes-item-excerpt{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.notes-empty{white-space:pre-line;color:#8e8e98;text-align:center;padding:66px 16px;font-size:14px;line-height:1.7}
.notes-select-circle{width:23px;height:23px;flex:none;border:1px solid #adb1bb;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:12px}
.notes-select-circle.checked{background:#d49b22;border-color:#d49b22}
.notes-editor-screen{background:#fff}
.notes-editor-screen .notes-nav{background:#fff;border-bottom:1px solid #f2f2f4}
.notes-edit-pane{display:flex;flex-direction:column;flex:1;min-height:0;overflow-y:auto;padding:20px 20px 10px;background:#fff}
.notes-edit-title,.notes-edit-body{background:#fff;width:100%;border:0;outline:0;resize:none;color:#111318;font-family:inherit}
.notes-edit-title{min-height:47px;font-size:23px;font-weight:720;letter-spacing:-.5px;padding:5px 0}
.notes-edit-body{flex:1;min-height:140px;font-size:16px;line-height:1.68;padding:3px 0}
.notes-edit-title::placeholder,.notes-edit-body::placeholder{color:#b5b5bd}
.notes-editor-toolbar{display:flex;gap:0;justify-content:space-around;align-items:center;padding:4px 6px;height:53px;background:#f9f9fb;border-top:1px solid #e8e8ec;flex:none}
.notes-editor-toolbar .notes-icon-btn{color:#b58927!important;flex:1}
.notes-check-items{display:flex;flex-direction:column;gap:13px;min-height:60px;padding-top:10px}
.notes-check-row{display:flex;align-items:center;gap:8px}
.notes-check-row input[type=checkbox]{width:21px;height:21px;accent-color:#d3a132;flex:none}
.notes-check-text{border:0;outline:0;border-bottom:1px solid #eee;min-height:33px;flex:1;min-width:0;font-size:16px}
.notes-check-remove{font-size:24px;color:#aaa!important;padding:2px 7px}
.notes-add-check{align-self:flex-start;color:#b58b2b!important;padding:8px 0!important;font-size:14px}
.notes-toast{position:absolute;bottom:60px;left:50%;transform:translateX(-50%);padding:10px 13px;border-radius:13px;background:#24262edb;color:#fff;font-size:12px;white-space:nowrap;z-index:10}

/* Instagram — game-only interface, inherits iPhone status bar and game clock */
.phone:has(#app-view.ig-active:not([hidden])) .screen-layer{background:#fff}
.phone:has(#app-view.ig-active:not([hidden])) .status{background:#fff;color:#151515}
.phone:has(#app-view.ig-active:not([hidden])) .status-icons{color:#131313}
.phone:has(#app-view.ig-active:not([hidden])) .phone-footer{background:#fff}
.phone:has(#app-view.ig-active:not([hidden])) .home-button span{background:#232632}
#app-view.ig-active{display:flex;flex-direction:column;min-height:0;background:#fff;color:#171717}
.instagram-app{flex:1;display:flex;flex-direction:column;min-height:0;background:#fff;color:#151515;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
.ig-shell{flex:1;min-height:0;display:flex;flex-direction:column;background:#fff;position:relative}
.ig-shell button{font:inherit;border:0;background:transparent;color:inherit;cursor:pointer}
.ig-shell img{object-fit:cover;max-width:100%}
.ig-spacer{flex:1}
.ig-iconbtn{display:inline-flex;align-items:center;justify-content:center;padding:5px;min-width:30px;min-height:32px}
.ig-iconbtn svg,.ig-nav-btn svg{width:24px;height:24px;display:block}
.ig-top{height:54px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 14px;border-bottom:1px solid #f0f0f0}
.ig-logo{font-size:26px;font-weight:750;font-family:'Brush Script MT','Segoe Script',cursive;letter-spacing:-1px}
.ig-top-actions{display:flex;gap:12px}
.ig-scroll{flex:1;overflow-y:auto;min-height:0;overscroll-behavior:contain;scrollbar-width:thin}
.ig-nav{height:53px;flex:none;display:flex;justify-content:space-around;align-items:center;border-top:1px solid #e8e8e8;background:#fff}
.ig-nav-btn{display:grid;place-items:center;min-width:48px;height:45px;padding:3px}
.ig-nav-btn.current svg{stroke-width:2.5}
.ig-nav-avatar{width:26px!important;height:26px!important;border:1.5px solid #222}
.ig-avatar{width:40px;height:40px;display:grid;place-items:center;background:#d8d9db;color:#fff;border-radius:50%;flex-shrink:0;overflow:hidden;font-size:19px}
.ig-avatar img{width:100%;height:100%;object-fit:cover}
.ig-avatar.small{width:34px;height:34px;font-size:15px}
.ig-avatar.large{width:82px;height:82px;font-size:31px}
.ig-stories{padding:11px 9px 12px;display:flex;gap:13px;overflow-x:auto;border-bottom:1px solid #ececec;scrollbar-width:none}
.ig-stories::-webkit-scrollbar{display:none}
.ig-story-circle-wrap{width:68px;flex:0 0 68px;display:flex;flex-direction:column;align-items:center;gap:5px}
.ig-story-button{width:65px;height:65px;border-radius:50%;padding:3px!important;position:relative;background:linear-gradient(35deg,#ffcf2b,#ef3a68,#ad35cf)!important}
.ig-story-button .ig-avatar{width:100%;height:100%;border:3px solid #fff}
.ig-story-circle-wrap.seen .ig-story-button{background:#ddd!important}
.ig-story-name{font-size:10px;max-width:70px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.ig-story-plus{position:absolute;right:0;bottom:1px;width:19px;height:19px;border-radius:50%;border:2px solid #fff;background:#329dff;color:#fff;font-size:18px;line-height:15px}
.ig-post{border-bottom:1px solid #f2f2f2;padding-bottom:12px}
.ig-post-head{padding:8px 12px;display:flex;align-items:center;gap:8px;min-height:49px}
.ig-account-click{display:flex;gap:9px;align-items:center;flex:1;text-align:left;font-size:12px;font-weight:650;min-width:0}
.ig-post-time{font-size:10px;color:#8e8e8e;white-space:nowrap}
.ig-post-photo{display:block;width:100%;padding:0!important;aspect-ratio:1/1;overflow:hidden;background:#eee!important}
.ig-post-photo img{display:block;width:100%;height:100%;object-fit:cover}
.ig-post-actions{display:flex;gap:9px;align-items:center;padding:7px 11px 0}
.ig-post-actions .ig-iconbtn{padding:3px;min-height:32px;gap:4px}
.ig-heart-count{font-size:10px;font-weight:600}
.ig-shell button.liked{color:#ed3156}
.ig-shell button.liked svg{fill:#ed315633}
.ig-caption{font-size:12px;line-height:1.6;padding:4px 14px;white-space:pre-wrap;overflow-wrap:anywhere}
.ig-caption strong{margin-right:4px}
.ig-view-comments{font-size:11px!important;color:#858585!important;margin:0 13px;padding:3px 0}
.ig-toolbar{height:52px;display:grid;grid-template-columns:42px 1fr 42px;align-items:center;border-bottom:1px solid #efefef;padding:0 9px;flex:none;text-align:center}
.ig-toolbar strong{font-size:15px}
.ig-primary-link{color:#0097f5!important;font-size:13px!important;font-weight:700!important;padding:7px 2px!important}
.ig-profile-summary{display:flex;align-items:center;gap:18px;padding:18px 14px 6px}
.ig-profile-stats{display:flex;justify-content:space-between;gap:15px;flex:1;text-align:center}
.ig-profile-stats>div{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px}
.ig-profile-stats strong{font-size:15px}.ig-profile-stats small{font-size:10px}
.ig-profile-bio{padding:2px 16px 7px;font-size:12px;line-height:1.5;white-space:pre-line}
.ig-profile-bio p{margin:3px 0}
.ig-linktext{color:#294d86}
.ig-profile-buttons{display:flex;gap:8px;padding:8px 14px 16px}
.ig-shell .ig-pill{flex:1;background:#efeff0!important;border-radius:8px;padding:9px!important;font-size:12px;font-weight:650}
.ig-profile-stories{padding:0 14px 12px;display:flex}
.ig-profile-grid-head{border-top:1px solid #eee;text-align:center;font-size:12px;font-weight:650;padding:12px}
.ig-profile-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px}
.ig-grid-item{aspect-ratio:1/1;padding:0!important;min-width:0;overflow:hidden}
.ig-grid-item img{width:100%;height:100%;display:block;object-fit:cover}
.ig-empty{padding:60px 16px;text-align:center;white-space:pre-line;font-size:12px;line-height:1.6;color:#858585}
.ig-edit{padding:12px 17px;display:flex;flex-direction:column;gap:12px}
.ig-edit>.ig-avatar{align-self:center}
.ig-link-btn{color:#0996f5!important;font-weight:700!important;font-size:13px!important}
.ig-form-line{display:flex;flex-direction:column;gap:5px;border-bottom:1px solid #eee;padding:7px 0;font-size:12px}
.ig-form-line input,.ig-form-line textarea{border:0;outline:none;background:#fff;color:#222;font:inherit;resize:vertical;padding:8px 0}
.ig-form-line textarea{min-height:65px}
.ig-hint{font-size:11px;color:#858585;line-height:1.6;margin:10px 14px}
.ig-compose{padding:0 15px 30px}
.ig-compose-modes{display:flex;gap:8px;margin:12px 0}
.ig-shell .ig-compose-mode{padding:9px 18px;border-radius:18px;background:#f4f4f4;font-size:12px}
.ig-shell .ig-compose-mode.active{background:#252525;color:#fff}
.ig-photo-picker{aspect-ratio:1/1;background:#eee;display:grid;place-items:center;overflow:hidden;border-radius:3px}
.ig-photo-picker img{width:100%;height:100%;object-fit:cover}
.ig-photo-placeholder{display:flex;align-items:center;flex-direction:column;gap:13px;color:#8c8c8c;font-size:13px}
.ig-photo-placeholder svg{width:36px;height:36px}
.ig-shell .ig-choose-photo{display:block;margin:14px auto;background:#119aff;color:white;padding:10px 23px;border-radius:20px;font-size:13px;font-weight:650}
.ig-compose-caption{width:100%;min-height:75px;border:0;border-top:1px solid #eee;border-bottom:1px solid #eee;padding:15px 2px;font:inherit;font-size:13px;resize:vertical;outline:none}
.ig-story-screen{background:#12121a;color:#fff;overflow:hidden}
.ig-story-picture{position:absolute;inset:0;background:#1d1f28;display:grid;place-items:center}
.ig-story-picture img{width:100%;height:100%;object-fit:contain}
.ig-story-overlay-top{position:relative;z-index:2;padding:9px 14px;background:linear-gradient(#0009,transparent);display:grid;grid-template-columns:1fr 32px;gap:6px}
.ig-story-progress{grid-column:1 / -1;height:3px;background:#ffffffa0;border-radius:5px}
.ig-story-identity{display:flex;align-items:center;gap:8px;font-size:12px}
.ig-story-identity small{color:#ddd;font-size:10px}
.ig-story-caption{position:relative;z-index:2;margin:auto 13px;align-self:center;padding:16px;border-radius:14px;background:#0007;text-shadow:0 1px 4px #111;white-space:pre-line;text-align:center;font-weight:750;font-size:18px;line-height:1.8}
.ig-story-bottom{position:relative;z-index:2;display:flex;align-items:center;gap:7px;padding:10px 15px 20px;margin-top:auto}
.ig-story-reply{width:100%;border:1px solid #eee!important;color:#fff!important;background:#ffffff1a!important;border-radius:20px;padding:12px 15px;font:inherit;font-size:13px}
.ig-search-bar{height:50px;display:flex;align-items:center;gap:8px;padding:8px 13px;background:#fff;border-bottom:1px solid #eee}
.ig-search-bar svg{width:19px;height:19px}
.ig-search-bar input{flex:1;background:#f2f2f5;padding:9px;border:0;outline:0;border-radius:10px;font-size:13px}
.ig-discover-heading{font-size:15px;margin:18px 13px}
.ig-discovery-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:2px}
.ig-discovery-tile{padding:0!important;aspect-ratio:1/1;overflow:hidden}
.ig-discovery-tile img{width:100%;height:100%;object-fit:cover}
.ig-search-user,.ig-search-post{display:flex;align-items:center;gap:11px;text-align:left;padding:10px 16px!important;width:100%;white-space:pre-line;font-size:12px}
.ig-search-post img{width:60px;height:60px;object-fit:cover}
.ig-reels-screen{background:#050505;color:white}
.ig-reels-top{position:absolute;top:10px;left:16px;z-index:3;font-size:19px;font-weight:750;text-shadow:0 1px 5px black}
.ig-reels-scroll{flex:1;overflow-y:auto;scroll-snap-type:y mandatory;min-height:0}
.ig-reel{height:100%;min-height:420px;position:relative;display:grid;place-items:center;scroll-snap-align:start}
.ig-reel>img{height:100%;width:100%;object-fit:cover}
.ig-reel-copy{position:absolute;bottom:35px;left:18px;right:18px;text-shadow:0 1px 5px black}
.ig-reel-copy p{font-size:13px;line-height:1.5}
.ig-reels-screen .ig-nav{background:#090909;border-color:#333;color:white}
.ig-activity-title,.ig-inbox-title{font-size:20px;margin:18px 15px}
.ig-activity-row{display:flex;align-items:center;gap:10px;padding:12px 15px;font-size:12px}
.ig-dm-row{width:100%;display:flex;align-items:center;gap:12px;padding:11px 15px!important;text-align:left}
.ig-dm-summary{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.ig-dm-summary strong{font-size:13px}.ig-dm-summary small{font-size:11px;color:#858585;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ig-dm-row>svg{transform:rotate(180deg);width:18px;color:#bbb}
.ig-chat-body{padding:10px 12px;display:flex;flex-direction:column;gap:9px}
.ig-chat-intro{display:flex;flex-direction:column;align-items:center;gap:8px;margin:15px 0 27px}
.ig-chat-intro small{color:#999;font-size:11px}
.ig-chat-bubble{max-width:80%;align-self:flex-start;padding:10px 13px;border-radius:17px;background:#f0f0f2;white-space:pre-wrap;font-size:13px;overflow-wrap:anywhere}
.ig-chat-bubble.me{align-self:flex-end;background:#4b58e0;color:#fff}
.ig-chat-compose,.ig-comment-form{height:56px;flex:none;display:flex;align-items:center;gap:9px;border-top:1px solid #eee;padding:8px 12px}
.ig-chat-compose input,.ig-comment-form input{flex:1;min-width:0;border:1px solid #eee;background:#f7f7f7;padding:10px 13px;border-radius:20px;outline:none;font-size:13px}
.ig-comments{padding:12px}.ig-comment-origin{border-bottom:1px solid #eee;padding:10px;font-size:13px}
.ig-comment-row{display:flex;align-items:center;gap:10px;font-size:12px}
.ig-toast{position:absolute;bottom:75px;left:15%;right:15%;z-index:20;padding:11px;background:#222;color:white;text-align:center;border-radius:8px;font-size:11px;box-shadow:0 4px 12px #0002}

/* 11월 3일 10:00 이후 주미라 프로필 사진의 스토리 링 */
.ig-profile-story-button {flex:0 0 88px;width:88px;height:88px;display:grid;place-items:center;}
.ig-profile-story-button .ig-avatar.large {width:100%;height:100%;border:3px solid white;}


/* Instagram 프로필: 숫자와 라벨은 항상 세로 중앙 정렬 (팔로잉 버튼 포함) */
.ig-profile-stats > div,
.ig-profile-stats > button.ig-stat-action {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  text-align: center;
  white-space: nowrap;
  background: transparent !important;
  border: 0;
}
.ig-profile-stats > button.ig-stat-action strong,
.ig-profile-stats > div strong { display:block;font-size:15px;line-height:20px;font-weight:750; }
.ig-profile-stats > button.ig-stat-action small,
.ig-profile-stats > div small { display:block;font-size:10px;line-height:15px;font-weight:400; }

/* 아직 스토리를 올리지 않은 플레이어 프로필에는 컬러 링을 표시하지 않음 */
.ig-shell .ig-story-button.ig-no-story {
  background: transparent !important;
  padding: 3px !important;
}
.ig-shell .ig-story-button.ig-no-story .ig-avatar {
  border: 0 !important;
  background-clip: padding-box;
}

/* Instagram 팔로잉 화면: 실제 앱을 참고한 프로필/아이디/팔로잉 버튼 정렬 */
.ig-following-list { background:#fff; }
.ig-following-search {
  display:flex;align-items:center;gap:9px;margin:12px 14px 7px;
  padding:9px 12px;background:#f1f1f4;border-radius:10px;
}
.ig-following-search svg {width:17px;height:17px;color:#8f8f98;flex-shrink:0;}
.ig-following-search input {width:100%;min-width:0;border:0;outline:0;background:transparent;font-size:13px;color:#202025;}
.ig-following-heading {font-size:13px;font-weight:650;padding:12px 16px 7px;color:#222;}
.ig-following-row {display:flex;align-items:center;gap:12px;padding:10px 14px;min-height:67px;}
.ig-shell button.ig-following-account {
  flex:1 1 auto;display:flex;align-items:center;gap:11px;
  min-width:0;text-align:left;padding:0;
}
.ig-following-account .ig-avatar {width:44px;height:44px;flex:0 0 44px;}
.ig-following-copy {display:flex;flex-direction:column;justify-content:center;gap:3px;min-width:0;flex:1;}
.ig-following-copy strong {display:block;font-size:13px;font-weight:700;line-height:17px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}
.ig-following-copy small {display:block;font-size:12px;font-weight:400;color:#73737a;line-height:16px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}
.ig-shell button.ig-following-pill {
  flex:0 0 auto;display:flex;align-items:center;justify-content:center;
  min-width:83px;min-height:33px;padding:0 13px;
  border-radius:8px;background:#efeff0;color:#202025;
  font-size:12px;font-weight:650;line-height:1;
}

/* 11/3 X·Instagram 급증 알림: 잠금화면 위에도 표시되는 공통 iOS 유사 배너 */
.ls-social-notification{position:absolute;z-index:90;top:65px;left:14px;right:14px;
 background:rgba(239,241,247,.96);color:#202534;border:1px solid rgba(255,255,255,.8);
 box-shadow:0 9px 24px rgba(0,0,0,.2);border-radius:17px;padding:12px 15px;
 text-align:left;display:flex;flex-direction:column;gap:4px;font-size:13px;cursor:pointer;}
.ls-social-notification strong{font-size:12px;}.ls-social-notification span{line-height:1.45;}
.ls-social-notification[hidden]{display:none!important;}

/* 11월 3일 폭로 이후 SNS 앱 미확인 요청 숫자 */
.home-view .app-icon[data-app="social"],.home-view .app-icon[data-app="instagram"]{position:relative;}
.ls-social-dock-badge{position:absolute;right:0;top:-7px;min-width:20px;height:21px;
 background:#ff3b30;color:white;border:2px solid #fff;border-radius:13px;
 padding:1px 4px;text-align:center;line-height:15px;font-size:11px;font-weight:700;}
.ls-social-dock-badge[hidden]{display:none!important;}
.ig-mina-choices{display:flex;flex-direction:column;align-items:flex-end;padding:8px 2px 12px;}
.ig-mina-choice{border:1px solid #c5cbe1;background:#eef2ff;color:#243b81;
 border-radius:17px;padding:11px 13px;max-width:92%;text-align:left;
 font-size:13px;line-height:1.6;white-space:normal;cursor:pointer;}


/* 인스타그램 DM 대화창: 헤더 / 말풍선 / 입력창 / 하단 선택지 */
.ig-dm-header{height:60px;flex:none;display:flex;align-items:center;gap:3px;padding:0 9px;border-bottom:1px solid #ededed;background:#fff;}
.ig-dm-header .ig-iconbtn{flex:none;min-width:34px;}
.ig-shell .ig-dm-header .ig-dm-header-identity{flex:1;min-width:0;display:flex;flex-direction:row;align-items:center;gap:9px;padding:5px 0;text-align:left;white-space:nowrap;}
.ig-shell .ig-dm-header .ig-dm-header-identity>.ig-avatar{flex:0 0 34px;width:34px;height:34px;}
.ig-shell .ig-dm-header .ig-dm-header-names{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:2px;line-height:1.2;}
.ig-shell .ig-dm-header .ig-dm-header-names>strong,.ig-shell .ig-dm-header .ig-dm-header-names>small{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ig-dm-header-names{display:flex;flex-direction:column;gap:2px;min-width:0;}
.ig-dm-header-names strong{font-size:14px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ig-dm-header-names small{font-size:11px;color:#777;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ig-dm-profile-button svg{height:21px;width:21px;}
.ig-chat-body{gap:7px;padding:10px 13px 13px;scrollbar-width:none;}
.ig-chat-body::-webkit-scrollbar{display:none;}
.ig-chat-intro{margin:15px 0 26px;}
.ig-chat-bubble{max-width:78%;font-size:13px;line-height:1.5;padding:10px 13px;border-radius:20px;background:#efeff1;color:#151515;white-space:pre-wrap;overflow-wrap:anywhere;}
.ig-chat-bubble.me{background:linear-gradient(125deg,#6b43ee,#485de8);color:white;}
.ig-chat-compose{height:57px;padding:8px 11px 9px;border-top:1px solid #f1f1f1;background:white;}
.ig-chat-compose input{height:39px;padding:8px 14px;border-radius:22px;border:1px solid #e8e8ec;background:#f7f7f8;font-size:13px;}
.ig-shell .ig-chat-compose button.ig-primary-link{flex:none;color:#3797f0;font-size:13px;font-weight:700;padding:8px 1px;}
.ig-dm-choice-tray{flex:none;display:flex;flex-direction:column;gap:7px;padding:8px 11px 12px;background:#f8f8fa;border-top:1px solid #ededf0;max-height:40%;overflow-y:auto;}
.ig-dm-choice-title{font-size:11px;font-weight:650;color:#777;padding:0 4px 2px;}
.ig-shell .ig-dm-choice-tray button.ig-mina-choice{width:100%;max-width:100%;border:1px solid #d8ddf5;background:white;color:#3347b9;border-radius:14px;padding:10px 12px;text-align:left;font-size:12px;line-height:1.5;white-space:normal;overflow-wrap:anywhere;}
.ig-shell .ig-dm-choice-tray button.ig-mina-choice:active{background:#eef1ff;}

/* 11/05 – tappable evidence image in Instagram DM. */
.ig-chat-evidence-photo{display:block;max-width:100%;max-height:340px;width:auto;height:auto;border-radius:12px;margin-top:6px;cursor:zoom-in;object-fit:contain}
.ig-document-lightbox{position:absolute;inset:0;background:rgba(0,0,0,.89);z-index:9999;display:flex;align-items:center;justify-content:center;padding:10px;cursor:zoom-out}
.ig-document-lightbox img{max-width:100%;max-height:94%;object-fit:contain}

/* FIX: SNS DM notification icons must not render at their native image size.
   Without these limits Instagram's 1024px icon fills the whole phone screen. */
.phone .ls-social-notification{
  box-sizing:border-box;
  width:auto;
  max-width:calc(100% - 28px);
  max-height:132px;
  overflow:hidden;
}
.phone .ls-social-notification-app{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
  height:24px;
  flex:none;
  font-size:12px;
  font-weight:700;
}
.phone .ls-social-notification-app img{
  display:block;
  width:21px!important;
  height:21px!important;
  max-width:21px!important;
  max-height:21px!important;
  flex:none;
  border-radius:5px;
  object-fit:cover;
}
.phone .ls-social-notification > span{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  line-clamp:2;
  overflow:hidden;
  overflow-wrap:anywhere;
  font-size:12px;
  line-height:1.45;
}
/* Compact unread Instagram and X icons next to the clock. */
.phone .ls-social-status-icons{
  position:absolute;
  top:15px;
  left:83px;
  z-index:55;
  display:flex;
  align-items:center;
  gap:5px;
  height:19px;
  max-width:65px;
}
.phone .ls-social-status-icons.has-message{left:85px;}
.phone .ls-social-status-icons button{
  display:flex;
  width:19px;
  height:19px;
  padding:0;
  border:0;
  background:transparent;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.phone .ls-social-status-icons button[hidden],
.phone .ls-social-status-icons[hidden]{display:none!important;}
.phone .ls-social-status-icons img{
  display:block;
  width:18px!important;
  height:18px!important;
  max-width:18px!important;
  max-height:18px!important;
  object-fit:cover;
  border-radius:4px;
}

/* 11/06: profile account switcher and a read-only archived DM account. */
.ig-switch-trigger{appearance:none;border:0;background:transparent;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:0;max-width:100%;font:inherit;color:inherit;cursor:pointer;padding:6px 8px;white-space:nowrap;line-height:20px;}
.ig-switch-trigger strong{font-weight:700;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
/* Compact downward chevron, aligned with the account name rather than underneath. */
.ig-switch-chevron{display:block;width:7px;height:7px;flex:0 0 7px;box-sizing:border-box;border-right:1.7px solid currentColor;border-bottom:1.7px solid currentColor;transform:translateY(-2px) rotate(45deg);font-size:0;line-height:0;}
.ig-switch-cover{position:absolute;inset:0;z-index:30;border:0;background:rgba(0,0,0,.25);cursor:pointer;}
.ig-switch-menu{position:absolute;top:60px;left:16px;right:16px;z-index:31;padding:14px 12px 10px;border-radius:18px;background:#fff;color:#171717;box-shadow:0 10px 34px rgba(0,0,0,.24);display:grid;gap:4px;}
.ig-switch-title{padding:5px 7px 10px;font-size:15px;}
.ig-switch-account{display:flex;align-items:center;gap:11px;text-align:left;padding:9px 7px;background:none;border:0;border-radius:12px;width:100%;cursor:pointer;color:inherit;}
.ig-switch-account:hover{background:#f5f5f5;}
.ig-switch-account .ig-avatar{flex:0 0 37px;width:37px;height:37px;}
.ig-switch-name{flex:1;display:flex;flex-direction:column;gap:3px;min-width:0;}
.ig-switch-name strong{font-size:13px;}.ig-switch-name small{font-size:11px;color:#888;}
.ig-switch-mark{font-size:20px;color:#4861e7;}
.ig-secret-date{text-align:center;font-size:11px;color:#999;margin:17px 5px 10px;}
.ig-secret-readonly{flex:none;padding:13px 10px 18px;text-align:center;border-top:1px solid #efefef;color:#8b8b8b;background:#fafafa;font-size:12px;}
