/* iPhone-style shell, drawn entirely in CSS (no images). */
* { box-sizing: border-box; }
:root {
  /* iOS apps (KakaoTalk, Messages, Instagram, Naver, Coupang) use the system font; elsewhere Pretendard stands in for it. */
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard Variable", Pretendard, "Malgun Gothic", system-ui, sans-serif;
  color: #000; background: #08090c; -webkit-font-smoothing: antialiased;
  --wallpaper: radial-gradient(120% 70% at 15% 5%, #9ec5ff 0%, transparent 55%),
    radial-gradient(90% 60% at 95% 95%, #ffa8c8 0%, transparent 60%),
    linear-gradient(165deg, #2f55d4 0%, #6a4be0 48%, #e57aa8 100%);
  --blue: #0a84ff;
  --hair: #c6c6c8;
}
body { margin: 0; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 20px; } /* minmax: wide content (scrolling rows) must not widen the phone */
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
h1 { margin: 0; }

/* Frame: titanium edge, black bezel, side buttons */
.phone { position: relative; width: 390px; height: min(844px, calc(100dvh - 40px)); min-height: 560px; padding: 11px;
  border-radius: 62px; background: #111; box-shadow: 0 0 0 3px #4b4b50, 0 0 0 5px #222, 0 30px 90px #000c; }
.glass { position: relative; height: 100%; display: flex; flex-direction: column; overflow: hidden; border-radius: 51px; background: #fff; }
.hw { position: absolute; width: 4px; border: 0; padding: 0; border-radius: 2px; background: #3a3a3f; }
.hw-action { left: -7px; top: 118px; height: 32px; }
.hw-vol-up { left: -7px; top: 176px; height: 60px; }
.hw-vol-down { left: -7px; top: 248px; height: 60px; }
.hw-power { right: -7px; top: 196px; height: 92px; }
.hw-power:hover { background: #5a5a60; }
.hw-power::after { content: '잠자기'; position: absolute; left: 14px; top: 50%; translate: 0 -50%; white-space: nowrap; font-size: 12px; color: #8e8e93; }
body[data-locked] .hw-power::after, body[data-onboarding] .hw-power::after { opacity: 0; }
body[data-morning] .hw-power::after { content: '나가기'; }
body[data-morning] #sleep { font-size: 0; }
body[data-morning] #sleep::after { content: '나가기 ↗'; font-size: 12px; }
/* CSS labels are not swapped by i18n.js, so English gets its own */
html[lang="en"] .hw-power::after { content: 'Sleep'; }
html[lang="en"] body[data-morning] .hw-power::after { content: 'Go out'; }
html[lang="en"] body[data-morning] #sleep::after { content: 'Go out ↗'; }
/* First-morning hint: points at the side button (framed phone) or the top-right 나가기 (small phones) */
#out-tip { position: absolute; z-index: 6; /* under banners (7) and dialogs (8) */ right: 10px; top: 214px; max-width: 170px; padding: 9px 12px; border: 0; border-radius: 12px;
  background: #0a84ff; color: #fff; font-size: 13px; line-height: 1.35; text-align: left; word-break: keep-all; box-shadow: 0 6px 20px #0004; animation: tip-nudge 1.4s ease-in-out infinite; }
#out-tip::after { content: ''; position: absolute; right: -6px; top: 50%; translate: 0 -50%; border: 7px solid transparent; border-right: 0; border-left-color: #0a84ff; }
#out-tip[hidden] { display: none; }
body[data-locked] #out-tip, body[data-onboarding] #out-tip { display: none; }
@media (prefers-reduced-motion: reduce) { #out-tip { animation: none; } }
@keyframes tip-nudge { 50% { translate: 4px 0; } }
@keyframes tip-nudge-up { 50% { translate: 0 -4px; } }

/* Status bar, Dynamic Island, home indicator */
.status { position: absolute; z-index: 5; inset: 0 0 auto; height: 50px; display: flex; align-items: center; justify-content: space-between;
  padding: 2px 26px 0 38px; font-size: 16px; font-weight: 600; pointer-events: none; }
.island { position: absolute; left: 50%; top: 11px; translate: -50% 0; width: 122px; height: 35px; border-radius: 20px; background: #000; }
.status-right { display: flex; align-items: center; gap: 8px; }
.status-icons { display: flex; align-items: center; gap: 5px; }
.status-icons svg { height: 11px; }
.battery { position: relative; width: 25px; height: 12px; border: 1px solid currentColor; border-radius: 4px; opacity: .9; }
.battery::after { content: ''; position: absolute; right: -3.5px; top: 3.5px; width: 2px; height: 4px; border-radius: 0 1px 1px 0; background: currentColor; }
.battery i { position: absolute; inset: 1.5px; right: 22%; border-radius: 2px; background: currentColor; }
#sleep { display: none; pointer-events: auto; border: 0; padding: 2px 6px; border-radius: 10px; background: #0000001a; font-size: 12px; }
body[data-onboarding] #sleep, body[data-locked] #sleep { visibility: hidden; }
footer { position: absolute; z-index: 6; inset: auto 0 6px; display: flex; justify-content: center; pointer-events: none; }
#home { pointer-events: auto; display: grid; place-items: center; width: 160px; height: 22px; padding: 0; border: 0; background: none; }
#home span { width: 136px; height: 5px; border-radius: 3px; background: #000; }
body[data-onboarding] footer, body[data-locked] footer { visibility: hidden; }
/* light status bar and home bar over dark screens */
.glass:has(#screen > .home, #screen > .lockscreen, #screen > .scene, #screen > .ending-card, #screen > .ending-list, .app-head.app-cosmo) .status { color: #fff; }
.glass:has(#screen > .home, #screen > .scene, .app-body.app-cosmo) #home span { background: #fff; }
.glass:has(#screen > .lockscreen) #clock { visibility: hidden; } /* the lock screen shows its own big clock */
#screen { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#storage-status { position: absolute; z-index: 9; inset: auto 12px 40px; margin: 0; padding: 8px 12px; border-radius: 10px; background: #fff; font-size: 12px; color: #b3261e; box-shadow: 0 4px 20px #0003; }

/* Home screen */
.home { position: relative; flex: 1; padding: 66px 18px 0; background: var(--wallpaper); }
.app-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 0; }
.app-icon { border: 0; padding: 0; background: none; color: #fff; font-size: 11.5px; display: grid; justify-items: center; gap: 5px; text-shadow: 0 1px 3px #0005; }
.app-icon b { position: relative; isolation: isolate; width: 62px; height: 62px; display: grid; place-items: center; border-radius: 15px;
  color: #fff; font-size: 26px; text-shadow: none; box-shadow: 0 2px 8px #0003; }
.dock { position: absolute; inset: auto 12px 26px; display: flex; justify-content: center; gap: 0 22px;
  padding: 15px 8px; border-radius: 34px; background: #ffffff40; backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6); }
.dock:empty { display: none; }
.dock .app-icon span { display: none; }
.badge { position: absolute; top: -6px; right: -7px; min-width: 23px; height: 23px; padding: 0 7px; border-radius: 12px;
  background: #ff3b30; color: #fff; font: 600 14px/23px -apple-system, system-ui, sans-serif; font-style: normal; text-align: center; }
/* KakaoTalk icon: brown speech bubble with "TALK" */
.app-icon[data-app="kakao"] b { color: #fee500; font: 900 11px/1 Arial, sans-serif; letter-spacing: .2px; }
.app-icon[data-app="kakao"] b::before { content: ''; position: absolute; z-index: -1; left: 10px; top: 13px; width: 42px; height: 33px; border-radius: 50%; background: #3a1d1d; }
.app-icon[data-app="kakao"] b::after { content: ''; position: absolute; z-index: -1; left: 17px; top: 40px; border: 6px solid transparent; border-top: 9px solid #3a1d1d; rotate: 25deg; }
/* Messages icon: white speech bubble on green */
.app-icon[data-app="sms"] b::before { content: ''; position: absolute; left: 11px; top: 14px; width: 40px; height: 31px; border-radius: 50%; background: #fff; }
.app-icon[data-app="sms"] b::after { content: ''; position: absolute; left: 13px; top: 38px; border: 5px solid transparent; border-top: 9px solid #fff; rotate: 35deg; }

/* Other icons */
.app-icon[data-app="sns"] b::before { content: ''; width: 34px; height: 34px; border: 4px solid #fff; border-radius: 11px; box-sizing: border-box; }
.app-icon[data-app="sns"] b::after { content: ''; position: absolute; width: 13px; height: 13px; border: 3.5px solid #fff; border-radius: 50%; box-sizing: border-box; }
.app-icon[data-app="portal"] b, .app-icon[data-app="postype"] b { font: 900 30px/1 Arial, sans-serif; }
.app-icon[data-app="cosmo"] b { font: 700 13px/1 Arial, sans-serif; letter-spacing: -.3px; }
.app-icon[data-app="photos"] b { background: #fff; }
.app-icon[data-app="photos"] b::before { content: ''; width: 42px; height: 42px; border-radius: 50%;
  background: conic-gradient(#f5b70a 0 45deg, #f28b1d 0 90deg, #ea4c64 0 135deg, #b05bd6 0 180deg, #4f7cf5 0 225deg, #2fb8d6 0 270deg, #47c35a 0 315deg, #b8d63a 0); }

/* App navigation bar */
.app-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 96px; padding: 52px 10px 8px;
  background: #f9f9f9f0; border-bottom: .5px solid var(--hair); }
.app-head h1 { font-size: 17px; font-weight: 600; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back { justify-self: start; display: flex; align-items: center; gap: 2px; background: none; border: 0; padding: 4px 0; color: var(--blue); font-size: 17px; white-space: nowrap; }
.back::before { content: '‹'; font-size: 34px; line-height: 20px; margin-top: -4px; }
.app-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* Chat lists */
.chat-list { overflow-y: auto; flex: 1; padding-bottom: 30px; }
.chat-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 16px; border: 0; background: #fff; text-align: left; }
.chat-row + .chat-row { box-shadow: inset 74px .5px 0 #fff, inset 0 .5px 0 #e5e5ea; }
.avatar { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 18px; background: #a9bfd6; color: #fff; font-style: normal; font-weight: 700; }
.app-sms .avatar { border-radius: 50%; background: linear-gradient(#a5aab3, #868b94); }
.chat-row-text { flex: 1; min-width: 0; display: grid; gap: 3px; }
.chat-row-text b { font-size: 16px; font-weight: 600; }
.chat-row-text span { font-size: 14px; color: #8e8e93; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row .badge { position: static; flex: none; }
.empty { text-align: center; color: #8e8e93; padding: 40px 0; }

/* Chat rooms (shared) */
.messages { flex: 1; overflow-y: auto; padding: 14px 12px; }
.bubble { display: flex; align-items: flex-end; gap: 5px; margin: 0 0 4px; }
.bubble.me { flex-direction: row-reverse; }
.stamp { flex: none; font-size: 10.5px; color: #4f5d6b; }
.day-divider { width: fit-content; margin: 14px auto 10px; padding: 4px 12px; border-radius: 12px; background: #00000026; color: #fff; font-size: 12px; }
.message { width: fit-content; max-width: 72%; margin: 0; padding: 8px 12px; line-height: 1.4; font-size: 15.5px; overflow-wrap: anywhere; white-space: pre-wrap; }
.read-mark { margin: 2px 6px 6px; text-align: right; font-size: 11px; color: #8e8e93; }
.typing { width: fit-content; margin: 0 0 4px; padding: 8px 14px; border-radius: 16px; color: #8e8e93; font-size: 13px; }
.choices { display: grid; gap: 7px; max-height: 45%; overflow-y: auto; padding: 10px 12px; border-top: .5px solid var(--hair); background: #f9f9f9; }
.choices button { padding: 11px 14px; border: 1px solid #d1d1d6; border-radius: 16px; background: #fff; text-align: left; font-size: 15px; }
.app-body > .choices:last-child, .scene > .choices:last-child { padding-bottom: 32px; }
.composer { display: flex; align-items: center; gap: 8px; padding: 7px 10px 32px; background: #fff; border-top: .5px solid #e5e5ea; }
.composer i { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #f2f2f7; color: #8e8e93; font-style: normal; font-size: 22px; }
.composer span { flex: 1; padding: 7px 14px; border: 1px solid #d8d8dc; border-radius: 18px; color: #b0b0b5; font-size: 15px; }
.free-input { display: flex; gap: 8px; }
.free-input input { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid #d1d1d6; border-radius: 20px; }
.free-input button { flex: none; border: 0; border-radius: 20px; padding: 0 16px; background: var(--blue); color: #fff; font-weight: 600; }
.hint { margin: 0; min-height: 1em; font-size: 13px; color: #6e6e73; }

/* KakaoTalk */
.app-head.app-kakao { grid-template-columns: auto 1fr auto; gap: 6px; background: #fff; border-color: transparent; }
.app-head.app-kakao h1 { text-align: left; font-size: 22px; font-weight: 700; }
.app-head.app-kakao .back { color: #222; font-size: 0; }
.app-head.app-kakao::after { content: ''; width: 88px; height: 24px; background: no-repeat right / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 24' fill='none' stroke='%23222' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='6.5'/%3E%3Cpath d='M15 15l5 5M42 4v16M34 12h16M74 3v3M74 18v3M65 12h3M80 12h3M67.6 5.6l2.1 2.1M78.3 16.3l2.1 2.1M67.6 18.4l2.1-2.1M78.3 7.7l2.1-2.1'/%3E%3Ccircle cx='74' cy='12' r='5.5'/%3E%3Ccircle cx='74' cy='12' r='2'/%3E%3C/svg%3E"); }
.app-head.app-kakao.sub { grid-template-columns: auto 1fr auto; background: #bacee0; border-color: #bacee0; }
.app-head.app-kakao.sub h1 { font-size: 17px; font-weight: 600; }
.app-head.app-kakao.sub::after { width: 60px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 24' fill='none' stroke='%23222' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='6.5'/%3E%3Cpath d='M15 15l5 5M40 6h16M40 12h16M40 18h16'/%3E%3C/svg%3E"); }
.app-kakao .chat-row { gap: 12px; padding: 8px 16px; }
.app-kakao .chat-row + .chat-row { box-shadow: none; }
.app-kakao .avatar, .app-kakao .sender::before { border-radius: 38%; background: #c3d1df no-repeat 50% 100% / 76% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='%23eef3f8'%3E%3Ccircle cx='20' cy='15' r='8'/%3E%3Cpath d='M4 40c1-10 8-15 16-15s15 5 16 15z'/%3E%3C/svg%3E"); color: transparent; }
.app-kakao .avatar.group { background-color: #b5c7d8; }
.app-kakao .chat-row-text b { font-size: 15.5px; }
.chat-count { margin-left: 5px; color: #9a9a9a; font-size: 14px; font-weight: 500; }
.app-kakao .chat-row-text span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; font-size: 13.5px; line-height: 1.35; color: #777; }
.chat-row-end { flex: none; align-self: start; display: grid; justify-items: end; gap: 6px; padding-top: 3px; }
.chat-row-end small { color: #9a9a9a; font-size: 11.5px; }
.app-sms .chat-row-end small { font-size: 14px; }
.app-kakao .chat-row-end .badge { position: static; min-width: 20px; height: 20px; padding: 0 6px; background: #ff5b37; font-size: 11.5px; line-height: 20px; }
.kakao-tabs { flex: none; display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 0 30px; border-top: .5px solid #e5e5e5; background: #fff; }
.kakao-tabs span { text-align: center; font-size: 10.5px; color: #9a9a9a; }
.kakao-tabs span::before { content: ''; display: block; width: 22px; height: 22px; margin: 0 auto 3px; border: 2px solid currentColor; border-radius: 8px; }
.kakao-tabs .on { color: #111; font-weight: 700; }
.app-body.app-kakao .messages { background: #bacee0; }
.app-kakao .sender { position: relative; margin: 10px 0 4px 46px; font-size: 12.5px; color: #3d4a57; }
.app-kakao .sender::before { content: ''; position: absolute; left: -46px; top: 0; width: 38px; height: 38px; }
.app-kakao .bubble:not(.me) { margin-left: 46px; }
.app-kakao .message { position: relative; padding: 8px 11px; border-radius: 14px; background: #fff; font-size: 15px; }
.app-kakao .message.me { background: #fee500; }
.app-kakao .bubble.first .message::before { content: ''; position: absolute; top: 0; left: -6px; border-top: 10px solid #fff; border-left: 9px solid transparent; }
.app-kakao .bubble.first.me .message::before { left: auto; right: -6px; border-top-color: #fee500; border-left: 0; border-right: 9px solid transparent; }
.app-kakao .bubble.first .message { border-top-left-radius: 4px; }
.app-kakao .bubble.first.me .message { border-top-left-radius: 14px; border-top-right-radius: 4px; }
.app-kakao .typing { margin-left: 46px; background: #ffffffb3; }
.app-kakao .composer { gap: 6px; }
.app-kakao .composer i { border-radius: 8px; background: none; color: #555; font-size: 26px; }
.app-kakao .composer span { border: 0; border-radius: 20px; background: #f3f3f3; }
.app-kakao .composer b { flex: none; width: 26px; text-align: center; color: #555; font-size: 20px; font-weight: 400; }

/* Messages (iOS) */
.app-head.app-sms.sub { align-items: end; min-height: 120px; }
.app-head.app-sms.sub h1 { display: grid; justify-items: center; gap: 4px; font-size: 12px; font-weight: 500; }
.app-head.app-sms.sub h1::before { content: ''; width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(#a5aab3, #868b94); }
.app-sms .message { border-radius: 19px; background: #e9e9eb; }
.app-sms .message:not(.me) { border-bottom-left-radius: 6px; }
.app-sms .message.me { border-bottom-right-radius: 6px; background: var(--blue); color: #fff; }
.app-sms .typing { background: #e9e9eb; }
.app-sms .day-divider { margin: 14px auto 8px; padding: 0; background: none; color: #8e8e93; font-size: 11.5px; }

/* Feeds: Instagram, Naver, Postype, Photos */
.app-body:is(.app-portal, .app-photos) { overflow-y: auto; padding-bottom: 30px; }
.photo-block { position: relative; aspect-ratio: 1; display: flex; align-items: flex-end; padding: 12px; }
.photo-block span { padding: 6px 9px; border-radius: 8px; background: #0006; color: #fff; font-size: 12.5px; line-height: 1.45; }
.day-pill { width: fit-content; margin: 10px auto; padding: 3px 10px; border-radius: 10px; background: #0000000f; font-size: 12px; color: #6e6e73; }
.search { display: flex; gap: 8px; padding: 10px 12px; border-bottom: 3px solid #03c75a; }
.search input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid #d1d1d6; border-radius: 10px; }
.search button { border: 0; border-radius: 10px; padding: 0 14px; background: #03c75a; color: #fff; font-weight: 700; }
.result-list { display: grid; }
.result-list h3 { margin: 14px 14px 6px; font-size: 15px; }
.result { display: grid; gap: 3px; padding: 12px 14px; border: 0; border-bottom: .5px solid #e5e5ea; background: #fff; text-align: left; }
.result small { color: #03a94e; font-size: 12px; }
.result b { font-size: 15px; font-weight: 600; line-height: 1.4; }
.article { padding: 16px 18px; }
.article small { color: #8e8e93; }
.article h2 { margin: 6px 0 14px; font-size: 20px; line-height: 1.35; }
.article p { margin: 0 0 12px; line-height: 1.7; font-size: 15.5px; }
.album-title { margin: 14px 14px 8px; font-size: 18px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.photo-tile { aspect-ratio: 1; border: 0; padding: 0; }
.photo-caption { margin: 12px 16px 4px; line-height: 1.6; font-size: 15px; }
.photo-date { display: block; margin: 0 16px; color: #8e8e93; }

/* Ending card and list */
.ending-card, .ending-list { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 70px 22px 34px; color: #fff;
  background: radial-gradient(120% 70% at 50% 0%, #3b3b52, #101016 70%); }
.ending-card { align-items: center; justify-content: center; gap: 10px; text-align: center; }
.ending-kind { padding: 3px 10px; border-radius: 10px; background: #ffffff26; font-size: 13px; }
.ending-card h1 { font-size: 28px; line-height: 1.3; }
.ending-summary { margin: 0 0 8px; color: #d6d6de; line-height: 1.6; }
.ending-count { margin: 0; color: #9a9aa5; font-size: 13px; }
.ending-card .lock-open { width: 100%; padding: 13px; }
.ending-card[data-kind="해피"] .ending-kind, .ending-card[data-kind="재회"] .ending-kind { background: #ff8fb1; color: #000; }
.ending-card[data-kind="배드"] .ending-kind { background: #ff453a; }
.ending-card[data-kind="히든"] .ending-kind { background: #f5c46b; color: #000; }
.ending-list h1 { font-size: 26px; }
.ending-rows { flex: 1; overflow-y: auto; display: grid; align-content: start; gap: 8px; margin: 12px 0; }
.ending-row { padding: 11px 14px; border-radius: 14px; background: #ffffff14; }
.ending-row small { color: #f5c46b; font-size: 12px; }
.ending-row b { display: block; margin: 2px 0; }
.ending-row p { margin: 0; color: #c7c7cc; font-size: 13px; line-height: 1.5; }
.ending-row.locked { opacity: .6; }
.ending-row.locked small { color: #9a9aa5; }

/* Lock screen, alarm, end */
.lockscreen { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 64px 14px 34px; color: #fff; background: var(--wallpaper); text-align: center; }
.lock-date { margin: 0; font-size: 18px; font-weight: 600; opacity: .92; }
.lock-time { margin: 0 0 18px; font-size: 92px; font-weight: 700; line-height: 1; letter-spacing: -3px; }
.noti-list { flex: 1; width: 100%; display: grid; align-content: start; gap: 8px; overflow-y: auto; }
.noti { display: grid; gap: 1px; padding: 11px 14px 12px; border-radius: 22px; color: #111; text-align: left; font-size: 14.5px;
  background: #f5f5f7c7; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.noti-head { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.noti-head small { font-size: 12.5px; color: #3c3c43b3; }
.noti-time { margin-left: auto; }
.noti-icon { width: 20px; height: 20px; border-radius: 5px; background: #8e8e93; }
.noti-icon[data-app="kakao"] { background: #fee500; }
.noti-icon[data-app="sms"] { background: linear-gradient(#5df273, #23c43d); }
.noti-icon[data-app="cosmo"] { background: #111; }
.noti-icon[data-app="portal"] { background: #03c75a; }
.noti span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lock-bottom { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 12px 18px 0; }
.lock-round { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; font-size: 20px;
  background: #0000003d; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.lock-open { padding: 10px 18px; border: 0; border-radius: 22px; color: #fff; font-size: 14px; font-weight: 600;
  background: #ffffff38; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.alarm-card { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-radius: 24px; text-align: left;
  background: #0000002e; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.alarm-card small { font-size: 15px; opacity: .85; }
.alarm-card b { font-size: 26px; }
.alarm-stop { width: 100%; margin-top: auto; padding: 18px; border: 0; border-radius: 40px; background: #ff9f0a; color: #000; font-size: 20px; font-weight: 600; }
.end-title { margin-top: 26%; font-size: 38px; }
.end-sub { opacity: .85; }
.end .lock-open { margin-top: auto; }

/* In-person scene */
.scene { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-top: 50px; background: #101016; color: #ececf1; }
.scene-date { margin: 0; padding: 8px 22px 6px; font-size: 13px; color: #9a9aa5; }
.scene-log { flex: 1; overflow-y: auto; padding: 8px 22px 16px; }
.scene-log p { margin: 0 0 14px; line-height: 1.65; font-size: 15.5px; }
.scene-narr { color: #b9b9c4; }
.scene-line b { display: block; margin-bottom: 2px; font-size: 12px; color: #f5c46b; }
.scene-me { text-align: right; color: #8ec5ff; }
.scene .choices { background: #1a1a22; border-color: #2c2c36; }
.scene .choices button:not(.primary) { background: #262630; border-color: #383844; color: #ececf1; }
.scene .free-input input { background: #262630; border-color: #383844; color: #ececf1; }
.scene .hint { color: #b9b9c4; }

/* Notification banner */
#banner { position: absolute; z-index: 7; inset: 54px 8px auto; cursor: pointer; animation: drop .35s ease-out; }
#banner .noti { box-shadow: 0 8px 30px #0003; }
@keyframes drop { from { translate: 0 -120%; opacity: 0; } }

/* Sleep dialog (iOS alert) */
.overlay { position: absolute; z-index: 8; inset: 0; display: grid; place-items: center; padding: 24px; background: #0006; }
.overlay-card { width: 270px; display: grid; gap: 8px; padding: 18px 16px 14px; border-radius: 16px; background: #f2f2f7f5; text-align: center; }
.overlay-card b { font-size: 17px; }
.overlay-card p { margin: 0 0 6px; color: #3c3c43; font-size: 13.5px; line-height: 1.4; }
.overlay-card .primary { margin: 0; }
.secondary { padding: 12px; border: 0; border-radius: 12px; background: #e5e5ea; }

/* Onboarding */
/* First run (onboarding.js): iPhone setup style, like the original game's 시작하기 page */
.onboard { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 96px 24px 34px; background: #fff; overflow-y: auto; position: relative; }
.onboard h1 { margin: 0; font-size: 30px; font-weight: 700; text-align: center; }
.lang-pick { display: flex; align-self: center; gap: 2px; padding: 2px; border-radius: 9px; background: #e9e9eb; }
.lang-pick button { min-width: 84px; padding: 6px 12px; border: 0; border-radius: 7px; background: transparent; color: #3a3a3c; font: inherit; font-size: 13px; }
.lang-pick button.on { background: #fff; color: #000; font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.onboard .lang-pick { position: absolute; top: 54px; left: 50%; transform: translateX(-50%); }
.set-group + .lang-pick, .app-settings .lang-pick { margin: 0 auto 12px 16px; align-self: flex-start; }
.onboard-sub { margin: 0 0 22px; color: #6e6e73; font-size: 15px; line-height: 1.45; text-align: center; }
.setup-field { display: grid; gap: 8px; }
.setup-field span { padding-left: 4px; color: #6e6e73; font-size: 13px; font-weight: 600; }
.name-input { padding: 15px 16px; border: 0; border-radius: 14px; background: #f2f2f7; font-size: 17px; }
.setup-spacer { flex: 1; }
/* "시작하기 전에": numbered notice cards, then type the sentence to agree (same layout as the original) */
.notice-page { padding-top: 60px; }
.notice-page .onboard-sub { margin-bottom: 8px; }
.onb-notice { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.onb-notice li { padding: 13px 16px 9px; border-radius: 16px; background: #f2f2f7; color: #3a3a3c; font-size: 13.5px; line-height: 1.6; }
.onb-notice b { display: block; margin-bottom: 4px; color: #111; font-size: 15px; letter-spacing: -.3px; }
.onb-type { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.onb-type > span { color: #6e6e73; font-size: 13px; }
.onb-type em { font-style: normal; font-weight: 700; font-size: 16px; user-select: none; -webkit-user-select: none; }
.onb-type input { height: 50px; padding: 0 14px; border: 2px solid #e5e5ea; border-radius: 14px; font: inherit; font-size: 17px; outline: none; transition: border-color .2s; }
.onb-type input:focus { border-color: #0a84ff; }
.onb-type input.ok { border-color: #34c759; }
.onboard .primary:disabled { opacity: .35; }
.onboard .error { margin: 0 4px; }
.onboard .error:empty { display: none; }
.onboard .primary { border-radius: 14px; font-size: 17px; font-weight: 600; }
.error { margin: 0; min-height: 1.2em; color: #b3261e; font-size: 13px; }
.primary { margin-top: auto; padding: 15px; border: 0; border-radius: 14px; background: var(--blue); color: #fff; font-weight: 600; }
.primary:disabled { background: #c7c7cc; cursor: not-allowed; }

/* Small screens: the page is the phone. */
@media (max-width: 480px) {
  body { padding: 0; }
  .phone { width: 100%; height: 100dvh; min-height: 0; padding: 0; border-radius: 0; background: none; box-shadow: none; }
  .glass { border-radius: 0; }
  .hw, .island { display: none; }
  #sleep { display: block; }
  #out-tip { top: 52px; right: 12px; animation-name: tip-nudge-up; }
  #out-tip::after { right: 100px; top: -6px; /* under the status bar 나가기 */ translate: 0; border: 7px solid transparent; border-top: 0; border-bottom-color: #0a84ff; }
  .status { padding: max(2px, env(safe-area-inset-top)) 16px 0 22px; }
  footer { bottom: max(6px, env(safe-area-inset-bottom)); }
}

/* 쿠팡 */
.app-icon[data-app="shop"] b { font-size: 30px; }
.noti-icon[data-app="shop"] { background: #fff; box-shadow: inset 0 0 0 1px #ddd; }
.app-body.app-shop { overflow-y: auto; background: #fff; }
.app-head.app-shop:not(.sub) h1 { font: 800 25px/1 Arial, sans-serif; letter-spacing: -1px; color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(90deg, #7a3e1d 0 15%, #d6262b 15% 31%, #f2a51a 31% 46%, #7cb83f 46% 61%, #35a149 61% 75%, #2a8fd6 75% 89%, #1f6fd1 89%); }
.cp-search { display: flex; align-items: center; gap: 8px; margin: 4px 12px 8px; padding: 9px 12px 9px 36px; border: 1.5px solid #346aff; border-radius: 6px; font-size: 15px; color: #111;
  background: no-repeat 11px 50% / 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='7' cy='7' r='5' fill='none' stroke='%23346aff' stroke-width='2'/%3E%3Cpath d='M11 11l4 4' stroke='%23346aff' stroke-width='2'/%3E%3C/svg%3E"); }
.cp-search span { flex: 1; }
.cp-search i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #ccc; color: #fff; font-style: normal; font-size: 10px; }
.cp-sorts { display: flex; gap: 6px; overflow-x: auto; padding: 0 12px 8px; border-bottom: 1px solid #eee; scrollbar-width: none; }
.cp-sorts span { flex: none; padding: 5px 10px; border: 1px solid #ddd; border-radius: 15px; font-size: 12.5px; color: #333; }
.cp-sorts .on { border-color: #346aff; color: #346aff; font-weight: 700; }
.cp-banner { margin: 8px 12px 0; padding: 12px 14px; border-radius: 8px; background: linear-gradient(90deg, #c8102e, #0b6b3a); color: #fff; font-size: 14px; font-weight: 700; }
.cp-thought { margin: 10px 16px 0; padding-left: 10px; border-left: 3px solid #8e8e93; color: #6b6b70; font-size: 14px; font-style: italic; } /* the player thinking, not the app */
.cp-row { display: flex; gap: 12px; width: 100%; padding: 14px 12px; border: 0; border-bottom: 1px solid #f0f0f0; background: #fff; text-align: left; }
.cp-thumb, .cp-hero { position: relative; flex: none; display: grid; place-items: center; overflow: hidden; background: #fff; }
.cp-thumb { width: 118px; height: 118px; border: 1px solid #f0f0f0; border-radius: 4px; }
.cp-thumb span { font-size: 62px; filter: drop-shadow(0 6px 6px #0002); }
.cp-hero { aspect-ratio: 1; border-bottom: 1px solid #f0f0f0; }
.cp-hero span { font-size: 150px; filter: drop-shadow(0 12px 12px #0002); }
.cp-text { display: grid; align-content: start; gap: 3px; min-width: 0; }
.cp-name { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.4; color: #111; }
.cp-price { display: grid; gap: 0; }
.cp-off { display: flex; align-items: baseline; gap: 5px; margin: 2px 0 0; font-size: 12.5px; }
.cp-off em { font-style: normal; font-weight: 700; color: #e52528; }
.cp-off s { color: #888; }
.cp-now { display: flex; align-items: baseline; gap: 6px; margin: 0; }
.cp-now b { font-size: 17px; font-weight: 800; color: #ae0000; }
.cp-rocket { color: #0073e9; font: italic 800 12px/1.2 Arial, sans-serif; }
.cp-rocket::before { content: '🚀'; margin-right: 1px; font-style: normal; }
.cp-arrive { color: #008c00; font-size: 12.5px; font-weight: 600; }
.cp-stars { display: flex; align-items: center; margin: 0; font-size: 12px; letter-spacing: -1px; color: #ddd; }
.cp-stars .on { color: #ffb700; }
.cp-stars small { margin-left: 4px; letter-spacing: 0; color: #888; }
.cp-free { color: #555; font-size: 12px; }
.cp-seller { color: #346aff; font-size: 13px; }
.cp-tabs { position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 0 30px; border-top: 1px solid #e5e5e5; background: #fff; }
.cp-tabs span { text-align: center; font-size: 10.5px; color: #555; }
.cp-tabs span::before { content: ''; display: block; width: 20px; height: 20px; margin: 0 auto 3px; border: 2px solid currentColor; border-radius: 6px; }
.cp-tabs .on { color: #111; font-weight: 700; }
.cp-info { display: grid; gap: 6px; padding: 14px 16px 20px; }
.cp-info .cp-name { font-size: 17px; }
.cp-info .cp-price b { font-size: 22px; }
.cp-desc { margin: 8px 0 0; padding-top: 12px; border-top: 1px solid #eee; color: #555; line-height: 1.6; }
.cp-bar { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px 32px; border-top: 1px solid #e5e5e5; background: #fff; }
.cp-cart, .cp-buy { display: grid; place-items: center; min-height: 48px; border-radius: 4px; font-size: 15px; font-weight: 700; }
.cp-cart { border: 1px solid #346aff; color: #346aff; }
.cp-buy { border: 0; background: #346aff; color: #fff; }
.cp-buy:disabled { background: #c7c7cc; }

/* Postype */
.app-head.app-postype:not(.sub) h1 { font: 900 22px/1 Arial, sans-serif; letter-spacing: -.5px; }

/* Cosmo tabs and feed */

/* Cosmo (dark, like the real app; the app header is replaced by .cx-top) */
.app-head.app-cosmo { display: none; }
.app-body.app-cosmo { font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", sans-serif; letter-spacing: -.2px; --cx-bg: #090a0c; --cx-card: #1b1e22; --cx-line: #2a2e33; --cx-dim: #8b9097; --cx-violet: #a98bff;
  padding-top: 50px; background: var(--cx-bg); color: #fff; }
.app-body.app-cosmo.cx-channel { background: linear-gradient(#0d1033 0, var(--cx-bg) 260px); }
.app-cosmo svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cx-top { flex: none; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 4px 14px 6px; }
.cx-artist { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.cx-title { flex: 1; text-align: center; font-size: 17px; margin-right: 32px; }
.cx-top-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.cx-icon { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; background: none; color: #fff; }
.cx-shop { position: relative; padding: 7px 13px; border: 0; border-radius: 10px; background: linear-gradient(120deg, #b9a7f0, #e7d9f7 60%, #a7b7f2); color: #111; font-weight: 700; font-size: 15px; }
.cx-shop i { position: absolute; right: -6px; top: -7px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #ff2d55; color: #fff; font: 700 10px/1 Arial, sans-serif; }
.cx-como { display: flex; align-items: center; gap: 14px; padding: 6px 12px; border: 1px solid var(--cx-line); border-radius: 12px; background: #121418; }
.cx-como span { color: var(--cx-violet); }
.cx-top-text { font-size: 18px; color: #ddd; }
.cx-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 14px 20px; }
.cx-tabs { flex: none; display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 4px 28px; border-top: 1px solid var(--cx-line); background: #15171b; }
.cx-tabs button { display: grid; justify-items: center; gap: 3px; padding: 0; border: 0; background: none; color: #7d828a; font-size: 11px; }
.cx-tabs button.on { color: #fff; font-weight: 700; }
.cx-notice { display: flex; gap: 8px; margin: 6px 0 12px; }
.cx-notice p { flex: 1; margin: 0; padding: 13px 14px; border-radius: 10px; background: #21105f; font-size: 14px; }
.cx-notice i { display: grid; place-items: center; width: 46px; border-radius: 10px; background: #21105f; font-style: normal; }
.cx-banner { display: grid; justify-items: start; gap: 2px; width: 100%; padding: 18px 16px; border: 1px solid #ffffff1a; border-radius: 10px; color: #fff; text-align: left;
  background: linear-gradient(120deg, #13306b, #5b8fd8 55%, #d7e9ff); }
.cx-banner small { opacity: .8; }
.cx-banner b { font: 300 30px/1.1 Georgia, serif; letter-spacing: -.5px; }
.cx-banner span { font-size: 13px; opacity: .9; }
.cx-quick { display: flex; gap: 14px; overflow-x: auto; margin: 18px -14px 0; padding: 0 14px; }
.cx-quick-item { flex: none; display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none; color: #ddd; font-size: 13px; }
.cx-quick-item i { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #23272c; font-style: normal; font-size: 24px; }
.cx-section { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 10px; }
.cx-section h2 { margin: 0; font-size: 20px; }
.cx-more { border: 0; background: none; color: var(--cx-dim); font-size: 14px; }
.cx-room-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 -14px; padding: 0 14px; }
.cx-room-card { flex: none; width: 62%; display: grid; gap: 6px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--cx-card); color: #fff; text-align: left; }
.cx-room-card small { padding: 12px 12px 0; color: var(--cx-dim); }
.cx-room-card p { margin: 0; padding: 0 12px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-room-card .cx-photo { border-radius: 0; }
.cx-photo { position: relative; aspect-ratio: 4 / 5; display: flex; align-items: flex-end; padding: 10px; border-radius: 12px; }
.cx-photo span { padding: 5px 8px; border-radius: 8px; background: #0007; color: #fff; font-size: 12px; line-height: 1.45; }
.cx-subtabs { display: grid; grid-template-columns: 1fr 1fr; margin: 0 -14px 14px; border-bottom: 1px solid var(--cx-line); }
.cx-subtabs.three { grid-template-columns: repeat(3, 1fr); }
.cx-subtabs span { padding: 10px 0 12px; text-align: center; font-size: 17px; font-weight: 600; color: #7d828a; }
.cx-subtabs .on { color: #fff; box-shadow: inset 0 -3px #fff; }
.cx-h3 { margin: 4px 0 12px; font-size: 17px; }
.cx-best { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cx-rekord { position: relative; aspect-ratio: 3 / 4.3; border-radius: 10px; }
.cx-rekord small { position: absolute; left: 8px; bottom: 8px; font-size: 12px; }
.cx-rank { position: absolute; right: -4px; bottom: -10px; font: 900 46px/1 Arial, sans-serif; color: #fff; -webkit-text-stroke: 2px #000; }
.cx-plain { margin: 14px 0; color: var(--cx-dim); font-size: 14px; }
.cx-chips { display: flex; gap: 8px; overflow-x: auto; margin: 6px -14px 12px; padding: 0 14px; }
.cx-chips span, .cx-chips button { flex: none; padding: 7px 14px; border: 1px solid var(--cx-line); border-radius: 18px; background: var(--cx-card); color: #ddd; font-size: 14px; }
.cx-chips .on, .cx-chips button.on { background: #fff; color: #111; }
.cx-count { display: flex; justify-content: space-between; margin: 4px 0 12px; color: #ddd; font-size: 14px; }
.cx-empty { display: grid; justify-items: center; gap: 4px; padding: 40px 0; color: var(--cx-dim); }
.cx-pill { padding: 8px 16px; border: 0; border-radius: 18px; background: var(--cx-card); color: #fff; font-size: 13px; }
.cx-pill.dim { margin-left: auto; color: #ddd; }
.cx-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cx-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
.cx-cell { display: grid; gap: 4px; padding: 0; border: 0; background: none; color: #fff; text-align: left; font-size: 13px; }
.cx-cell small { color: #c7c7cc; }
.cx-cell .owned { color: var(--cx-violet); font-weight: 700; }
.cx-objekt { position: relative; aspect-ratio: 11 / 17; border-radius: 8px; overflow: hidden; background: linear-gradient(165deg, #eef3fb, #b9c8e6 60%, #8ea3cf); }
.cx-objekt-mark { position: absolute; left: 0; right: 14%; top: 50%; translate: 0 -50%; text-align: center; font: 300 46px/1 Georgia, serif; color: #ffffffb3; }
.cx-band { position: absolute; right: 4%; top: 5%; bottom: 5%; width: 11%; display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; border-radius: 4px; background: #9ad8ff; color: #10284a; writing-mode: vertical-rl; font: 700 9px/1 Arial, sans-serif; }
.cx-pass { margin: 4px 0 2px; color: #c7c7cc; font-size: 15px; }
.cx-pass b { color: var(--cx-violet); font-weight: 500; }
.cx-pass-note { margin: 4px 0 14px; color: var(--cx-dim); font-size: 13px; }
.cx-members { display: flex; align-items: flex-start; gap: 14px; overflow-x: auto; margin: 6px -14px 16px; padding: 0 14px; }
.cx-member { flex: none; display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none; color: #c7c7cc; font-size: 13px; }
.cx-member b { color: var(--cx-violet); font-weight: 500; }
.cx-divider { flex: none; align-self: stretch; width: 1px; margin: 8px 0 26px; background: var(--cx-line); }
.cx-avatar { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid #3a3f46; border-radius: 50%; background: linear-gradient(160deg, #f4f4f6, #c9ccd6); color: #555; font-style: normal; font-weight: 700; }
.cx-avatar.big { width: 62px; height: 62px; font-size: 22px; }
.cx-avatar.huge { width: 92px; height: 92px; font-size: 34px; }
.cx-heart { margin-left: 3px; font-size: .8em; }
.cx-post { padding: 14px 0 18px; }
.cx-post-head { display: flex; align-items: center; gap: 10px; }
.cx-post-head > div { display: grid; }
.cx-post-head small { color: var(--cx-dim); }
.cx-post p { margin: 12px 0 6px; font-size: 16px; line-height: 1.5; white-space: pre-line; }
.cx-translate { display: block; margin-bottom: 12px; color: var(--cx-dim); }
.cx-ch-head { display: flex; align-items: center; gap: 18px; margin: 4px 0 18px; }
.cx-ch-head h2 { margin: 0; font-size: 28px; }
.cx-ch-head p { margin: 4px 0 0; color: #c7c7cc; }
.cx-ch-head p b, .cx-since b { color: var(--cx-violet); font-weight: 500; }
.cx-talk-card { display: grid; gap: 6px; width: 100%; padding: 14px 16px; border: 0; border-radius: 14px; background: #24282e; color: #fff; text-align: left; }
.cx-talk-card p { margin: 0; color: #c7c7cc; }
.cx-talk-card small { color: var(--cx-dim); }
.cx-talk-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 0; border: 0; background: none; color: #fff; text-align: left; }
.cx-talk-row > div:nth-child(2) { flex: 1; min-width: 0; }
.cx-talk-row p { margin: 4px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #b0b4ba; }
.cx-talk-end { display: grid; justify-items: end; gap: 4px; align-self: start; padding-top: 6px; color: var(--cx-dim); }
.cx-talk-end .badge { position: static; }
.cx-date { width: fit-content; margin: 14px auto; color: var(--cx-dim); font-size: 12px; }
.cx-msg { display: flex; gap: 8px; margin-bottom: 12px; }
.cx-msg > div > small { color: #c7c7cc; font-size: 12.5px; }
.cx-msg-line { display: flex; align-items: flex-end; gap: 6px; margin-top: 4px; }
.cx-msg-line p { margin: 0; max-width: 230px; padding: 10px 14px; border-radius: 18px; background: #262a30; line-height: 1.45; font-size: 15px; }
.cx-msg-line small { flex: none; color: var(--cx-dim); font-size: 11px; }
.cx-compose { flex: none; display: flex; gap: 8px; align-items: center; padding: 10px 12px 30px; border-top: 1px solid var(--cx-line); }
.cx-compose span { flex: 1; padding: 12px 14px; border: 1px solid #3a3f46; border-radius: 12px; color: #7d828a; font-size: 14px; }
.cx-compose i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #3a3f46; color: #aaa; font-style: normal; }
.cx-me { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.cx-me h2 { margin: 0; font-size: 24px; }
.cx-since { margin: 14px 0 0; color: #ddd; }
.cx-shop-note { margin: 6px 0 0; padding: 12px 14px; border-radius: 10px; background: #21105f; font-size: 14px; }
.cx-info { display: grid; gap: 4px; margin: 14px 0; }
.cx-info h2 { margin: 0; font-size: 22px; }
.cx-info p { margin: 0; color: #c7c7cc; font-size: 14px; }
.cx-scroll > .cx-objekt { width: 62%; margin: 8px auto 0; }
.cx-buy { width: 100%; padding: 15px; border: 0; border-radius: 12px; background: #7b5cff; color: #fff; font-weight: 700; font-size: 16px; }
.cx-buy:disabled { background: #3a3f46; color: #9a9aa5; }
.cx-status { min-height: 1.2em; margin: 10px 0; color: var(--cx-violet); text-align: center; }
.cx-splash { flex: 1; display: grid; place-items: center; position: relative; }
.cx-splash svg { width: 70px; height: 88px; fill: none; stroke: #fff; stroke-width: 1.3; }
.cx-progress { position: absolute; left: 10%; right: 10%; bottom: 60px; height: 3px; background: #2a2e33; }
.cx-progress::after { content: ''; position: absolute; inset: 0 100% 0 0; background: #fff; animation: cx-load .85s ease-out forwards; }
@keyframes cx-load { to { right: 0; } }
.app-cosmo .empty { color: var(--cx-dim); }
.app-cosmo, .app-cosmo * { scrollbar-width: none; }
.app-cosmo ::-webkit-scrollbar { display: none; }

/* The player's own pictures (images/) cover the drawn placeholder */
.cx-avatar, .cx-photo, .cx-banner, .cx-rekord { position: relative; overflow: hidden; }
.pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.has-pic > .cx-band, .has-pic > .cx-rank, .has-pic > small { z-index: 1; }
.has-pic > .cx-objekt-mark, .cx-photo.has-pic > span, .cx-banner.has-pic > :not(img) { visibility: hidden; }
.cx-objekt.has-pic > .cx-band, .xx-banner.has-pic > .xx-banner-text { display: none; } /* the real card and banner already carry these */
.cx-banner.has-pic { aspect-ratio: 3; } /* the whole 3:1 banner photo, uncropped */
.app-head.app-kakao:not(.sub) { grid-template-columns: 1fr auto; padding-left: 18px; }
.app-head.app-kakao:not(.sub) .back { display: none; }
.app-body.app-shop > * { flex: none; }
.glass * { scrollbar-width: none; }
.glass ::-webkit-scrollbar { display: none; }

/* X (Twitter), laid out like the iOS app (dark theme at the end of the file); the app header is replaced by .xx-top */
.app-head.app-x { display: none; }
.app-body.app-x { position: relative; padding-top: 50px; background: #fff; color: #0f1419; font-size: 15px; }
.app-x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.xx-top { flex: none; border-bottom: 1px solid #eff3f4; }
.xx-top.simple { display: flex; align-items: center; gap: 16px; min-height: 50px; padding: 0 14px; }
.xx-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 14px 2px; }
.xx-logo { font: 700 26px/1 "Segoe UI Symbol", "Apple Symbols", sans-serif; }
.xx-spacer { width: 32px; flex: none; }
.xx-top.compose .xx-spacer { flex: 1; }
.xx-title { font-size: 17px; }
.xx-me, .xx-icon { display: grid; place-items: center; padding: 0; border: 0; background: none; }
.xx-feedtabs { display: grid; grid-template-columns: 1fr 1fr; }
.xx-feedtabs.four { grid-template-columns: repeat(4, auto); border-bottom: 1px solid #eff3f4; }
.xx-feedtabs span { padding: 12px 0; text-align: center; color: #536471; font-weight: 500; }
.xx-feedtabs .on { color: #0f1419; font-weight: 700; background: linear-gradient(#1d9bf0, #1d9bf0) no-repeat 50% 100% / 56px 4px; }
.xx-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 20px; }
.xx-tabs { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); padding: 10px 0 30px; border-top: 1px solid #eff3f4; background: #fff; }
.xx-tabs button { display: grid; place-items: center; padding: 0; border: 0; background: none; color: #0f1419; }
.xx-tabs svg { width: 26px; height: 26px; }
.xx-tabs .on svg { stroke-width: 2.6; }
.xx-avatar { flex: none; display: grid; place-items: center; position: relative; overflow: hidden; width: 40px; height: 40px; border-radius: 50%; background: #cfd9de; color: #fff; font-style: normal; font-weight: 700; }
.xx-avatar.small { width: 32px; height: 32px; font-size: 13px; }
.xx-avatar.big { width: 76px; height: 76px; margin-top: -38px; border: 4px solid #fff; font-size: 28px; }
.xx-post { display: flex; gap: 10px; padding: 12px 14px 8px; border-bottom: 1px solid #eff3f4; }
.xx-post-body { flex: 1; min-width: 0; }
.xx-post-head { display: flex; align-items: center; gap: 4px; margin: 0; white-space: nowrap; }
.xx-post-head b { display: inline-flex; flex-shrink: 0; max-width: 78%; align-items: center; gap: 2px; overflow: hidden; } /* like X: the name stays whole, the @handle gets the … */
.xx-post-head b svg, .app-x h2 svg, .xx-account b svg, .xx-switch b svg { width: 15px; height: 15px; }
.xx-post-head span { overflow: hidden; text-overflow: ellipsis; color: #536471; }
.xx-text { margin: 2px 0 0; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.xx-image { position: relative; overflow: hidden; display: flex; align-items: flex-end; aspect-ratio: 16 / 10; margin-top: 10px; padding: 8px; border: 1px solid #cfd9de; border-radius: 16px; }
.xx-image span { padding: 4px 7px; border-radius: 6px; background: #0007; color: #fff; font-size: 12px; }
.xx-note { margin-top: 10px; padding: 10px 12px; border: 1px solid #cfd9de; border-radius: 16px; }
.xx-note b { font-size: 14px; }
.xx-note p { margin: 4px 0 0; color: #536471; font-size: 14px; line-height: 1.4; }
.xx-actions { display: flex; justify-content: space-between; margin-top: 8px; color: #536471; }
.xx-act { display: flex; align-items: center; gap: 3px; padding: 0; border: 0; background: none; color: inherit; font-size: 13px; }
.xx-act svg { width: 18px; height: 18px; }
.xx-like.on { color: #f91880; }
.xx-like.on svg { fill: currentColor; }
.xx-fab { position: absolute; right: 16px; bottom: 96px; width: 56px; height: 56px; border: 0; border-radius: 50%; background: #1d9bf0; color: #fff; font-size: 30px; line-height: 1; box-shadow: 0 4px 12px #0003; }
.xx-toast { position: absolute; left: 16px; right: 16px; bottom: 96px; margin: 0; padding: 12px 16px; border-radius: 8px; background: #1d9bf0; color: #fff; font-size: 14px; animation: xx-fade 3s forwards; pointer-events: none; }
@keyframes xx-fade { 80% { opacity: 1; } 100% { opacity: 0; } }
.xx-account { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; border: 0; background: none; text-align: left; }
.xx-account div { flex: 1; display: grid; }
.xx-account b { display: inline-flex; align-items: center; gap: 3px; }
.xx-account span, .xx-muted { color: #536471; }
.xx-account em { color: #1d9bf0; font-style: normal; font-weight: 700; font-size: 18px; }
.xx-link { margin: 8px 16px; padding: 0; border: 0; background: none; color: #1d9bf0; font-size: 15px; }
.xx-muted { margin: 0 16px; font-size: 15px; }
.xx-pad { margin: 16px; }
.xx-banner { position: relative; overflow: hidden; height: 110px; background: linear-gradient(135deg, #8ecdf7, #c7d7fe); }
.xx-banner.alt { background: linear-gradient(135deg, #3a3f47, #6b7280); }
.xx-profile { display: flex; align-items: flex-start; justify-content: space-between; padding: 0 16px; }
.xx-pill { margin-top: 10px; padding: 6px 14px; border: 1px solid #cfd9de; border-radius: 18px; font-weight: 700; font-size: 14px; }
.app-x h2 { display: flex; align-items: center; gap: 4px; margin: 8px 16px 0; font-size: 20px; }
.xx-bio { margin: 10px 16px; line-height: 1.4; }
.xx-joined { display: flex; align-items: center; gap: 4px; }
.xx-joined svg { width: 16px; height: 16px; }
.xx-follow { margin: 10px 16px 12px; color: #536471; }
.xx-follow b { color: #0f1419; }
.xx-cancel { padding: 0; border: 0; background: none; font-size: 16px; }
.xx-send { padding: 7px 16px; border: 0; border-radius: 18px; background: #1d9bf0; color: #fff; font-weight: 700; }
.xx-send:disabled { opacity: .5; }
.xx-switch { display: flex; align-items: center; gap: 8px; margin: 12px 16px 0; padding: 0; border: 0; background: none; text-align: left; }
.xx-switch b { display: inline-flex; align-items: center; gap: 3px; }
.xx-switch span { color: #1d9bf0; font-size: 14px; }
.xx-draft { display: block; width: calc(100% - 32px); margin: 8px 16px 0; padding: 12px 14px; border: 1px solid #cfd9de; border-radius: 14px; background: #fff; text-align: left; font-size: 16px; line-height: 1.4; }
.xx-draft[aria-pressed="true"] { border-color: #1d9bf0; box-shadow: inset 0 0 0 1px #1d9bf0; background: #f0f8fe; }
.xx-audience { margin: 14px 16px; padding-top: 10px; border-top: 1px solid #eff3f4; color: #1d9bf0; font-size: 14px; font-weight: 700; }
.xx-notice { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #eff3f4; }
.xx-notice p { margin: 0; line-height: 1.4; }
.xx-heart { color: #f91880; font-style: normal; font-size: 22px; }
.xx-searchbox { flex: 1; padding: 8px 14px; border-radius: 20px; background: #eff3f4; color: #536471; }
.xx-h3 { margin: 14px 16px 6px; font-size: 20px; }
.xx-trend { display: grid; gap: 2px; padding: 10px 16px; }
.xx-trend small { color: #536471; font-size: 13px; }
.xx-welcome { margin: 24px 16px 8px; font-size: 28px; line-height: 1.2; }
.app-icon[data-app="x"] b { font: 700 28px/1 "Segoe UI Symbol", "Apple Symbols", sans-serif; color: #fff; }
.noti-icon[data-app="x"] { background: #000; }

/* Settings (iOS grouped list) */
.app-body.app-settings { background: #f2f2f7; overflow-y: auto; padding: 0 16px 24px; }
.app-head.app-settings { background: #f2f2f7; }
.set-label { margin: 18px 16px 6px; font-size: 13px; color: #6d6d72; }
.set-group { border-radius: 10px; background: #fff; overflow: hidden; }
.set-row { display: flex; justify-content: space-between; width: 100%; min-height: 44px; padding: 0 16px; border: 0; border-bottom: .5px solid #c6c6c8; background: none; font: inherit; font-size: 17px; text-align: left; align-items: center; color: #000; }
.set-row:last-child { border-bottom: 0; }
.set-row.on::after { content: '✓'; color: #007aff; font-weight: 600; }
.set-note { margin: 8px 16px; font-size: 13px; line-height: 1.4; color: #6d6d72; }
.app-icon[data-app="settings"] b { font-size: 34px; color: #fff; }

.set-link { color: #007aff; }

/* Phone how-to (guide.js): a hole over the real button, the card on the other half of the screen */
.overlay.coach { background: none; align-items: end; padding-bottom: 60px; }
.overlay.coach.dim { background: #0009; align-items: center; padding-bottom: 24px; }
.coach-hole { position: absolute; border-radius: 18px; box-shadow: 0 0 0 9999px #0009, 0 0 0 3px #0a84ff inset; pointer-events: none; }
.coach-card { position: relative; text-align: left; }
.coach-card.top { align-self: start; margin-top: 60px; }
.coach-card .coach-key { padding: 8px 10px; border-radius: 10px; background: #fff3c4; color: #5c4300; font-weight: 700; } /* the one thing not to miss */
.coach-head { display: flex; justify-content: space-between; align-items: center; }
.coach-head small { color: #8e8e93; font-size: 12px; }
.coach-skip { border: 0; padding: 4px 0; background: none; color: #007aff; font-size: 13px; }
.coach-nav { display: flex; gap: 8px; }
.coach-nav button { flex: 1; margin: 0; }
.coach-glow { background: #0a84ff !important; box-shadow: 0 0 0 4px #0a84ff66; animation: glow 1s ease-in-out infinite alternate; }
@keyframes glow { to { box-shadow: 0 0 0 9px #0a84ff22; } }
@media (prefers-reduced-motion: reduce) { .coach-glow { animation: none; } }
.glass:has(.coach) #out-tip { display: none; } /* the how-to comes first */

/* Cosmo: live replays, Rekord cards and grid */
.cx-live { position: relative; overflow: hidden; aspect-ratio: 16 / 9; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(160deg, #1d1f2b, #3b2f5c); }
.cx-live small { position: absolute; left: 10px; top: 10px; padding: 3px 8px; border-radius: 6px; background: #ff3b5c; color: #fff; font-size: 11px; font-weight: 700; }
.cx-live i { font-style: normal; font-size: 34px; color: #fff; opacity: .9; }
.cx-live span { position: absolute; right: 10px; bottom: 10px; padding: 2px 6px; border-radius: 6px; background: #0009; color: #fff; font-size: 12px; }
.cx-rekord { border: 0; padding: 0; color: #fff; text-align: left; }
.cx-avatar.tag { position: absolute; z-index: 1; left: 6px; top: 6px; width: 30px; height: 30px; font-size: 12px; border-color: var(--cx-violet); }
.cx-rk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
.cx-rk-cell { display: grid; gap: 6px; min-width: 0; }
.cx-rk-cell .cx-rekord { aspect-ratio: 3 / 4; }
.cx-rk-cell p { margin: 0; color: #ddd; font-size: 13px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-rk-text { margin: 14px 0 10px; font-size: 16px; line-height: 1.5; }
.cx-plain.small { font-size: 13px; margin: 4px 0 10px; }

/* Pull to refresh (pull.js): the spinner grows as you pull, turns solid past the line, spins while loading */
.pull { flex: none; height: 0; overflow: hidden; display: grid; place-items: center; transition: height .2s; }
.pull i { width: 22px; height: 22px; border: 2.5px solid #cfd9de; border-top-color: var(--pull, #8e8e93); border-radius: 50%; opacity: .5; }
.pull.ready i { opacity: 1; }
.pull.loading i { opacity: 1; animation: pull-spin .7s linear infinite; }
@keyframes pull-spin { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) { .pull.loading i { animation-duration: 2s; } }
.app-x { --pull: #1d9bf0; }
.app-sns { user-select: none; -webkit-user-select: none; } /* mouse pulls would select text */
.verified { display: inline-grid; place-items: center; width: 13px; height: 13px; margin-left: 4px; border-radius: 50%; background: #0095f6; color: #fff; font-size: 8px; vertical-align: 1px; }
.xx-logo-btn { padding: 0; border: 0; background: none; color: inherit; }
.app-x .xx-scroll { user-select: none; -webkit-user-select: none; } /* mouse pulls would select text */

/* Real app icons for Cosmo, Coupang, KakaoTalk and Postype (icons/, from their Google Play listings; the user's choice, 2026-11-12).
   !important: home() paints each tile's colour inline. */
.app-icon[data-app="cosmo"] b, .noti-icon[data-app="cosmo"] { background: #fff url(icons/cosmo.jpg) center / cover !important; color: transparent; }
.app-icon[data-app="shop"] b, .noti-icon[data-app="shop"] { background: #fff url(icons/coupang.png) center / cover !important; color: transparent; box-shadow: none; }
.app-icon[data-app="kakao"] b, .noti-icon[data-app="kakao"] { background: #fee500 url(icons/kakao.png) center / cover !important; color: transparent; }
.app-icon[data-app="kakao"] b::before, .app-icon[data-app="kakao"] b::after { content: none; }
.app-icon[data-app="postype"] b, .noti-icon[data-app="postype"] { background: #000 url(icons/postype.png) center / cover !important; color: transparent; }

/* Instagram (feeds.js): own top bar and tabs like the app, so the shared header is hidden */
.app-head:is(.app-sns, .app-postype) { display: none; }
.app-body.app-sns { background: #fff; overflow: hidden; }
.ig-top { flex: none; display: flex; align-items: center; justify-content: space-between; min-height: 96px; padding: 50px 14px 4px; }
.ig-top.sub { justify-content: flex-start; gap: 14px; min-height: 92px; border-bottom: .5px solid #dbdbdb; }
.ig-top.sub > .ig-ico:last-child { margin-left: auto; }
.ig-word { font: 400 31px/1 "Grand Hotel", "Snell Roundhand", cursive; letter-spacing: .3px; }
.ig-ico { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; background: none; color: #000; }
.ig-ico svg, .ig-act svg, .ig-tabs svg, .ig-ptabs svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ig-ico svg[aria-hidden] path[d^="M5 12h"] { stroke-width: 3; }
.ig-sub-title { display: grid; font-size: 16px; font-weight: 700; line-height: 1.2; }
.ig-sub-title small { color: #737373; font-size: 12px; font-weight: 400; }
.ig-scroll { flex: 1; min-height: 0; overflow-y: auto; user-select: none; -webkit-user-select: none; }
.ig-stories { display: flex; gap: 14px; overflow-x: auto; padding: 8px 12px 12px; border-bottom: .5px solid #dbdbdb; scrollbar-width: none; }
.ig-story { flex: none; display: grid; justify-items: center; gap: 4px; width: 68px; padding: 0; border: 0; background: none; color: #000; }
.ig-story small { max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.ig-ring { position: relative; display: grid; place-items: center; width: 66px; height: 66px; padding: 3px; border-radius: 50%; background: conic-gradient(from 200deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5, #feda75); }
.ig-ring.seen { background: #dbdbdb; padding: 1.5px; }
.ig-ring.me { background: none; padding: 0; }
.ig-ring i { width: 100%; height: 100%; display: grid; place-items: center; border: 2.5px solid #fff; border-radius: 50%; background: linear-gradient(160deg, #f4f4f6, #c9ccd6); color: #555; font-style: normal; font-weight: 700; font-size: 22px; }
.ig-ring em { position: absolute; right: 0; bottom: 0; width: 20px; height: 20px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; background: #0095f6; color: #fff; font-style: normal; font-weight: 700; font-size: 14px; }
.ig-ring.small { width: 34px; height: 34px; padding: 2px; }
.ig-ring.small i { border-width: 1.5px; font-size: 13px; }
.ig-ring.tiny { width: 27px; height: 27px; padding: 0; background: #000; }
.ig-ring.tiny i { border-width: 1.5px; font-size: 11px; }
.ig-ring.big { width: 88px; height: 88px; }
.ig-ring.big i { font-size: 30px; }
.ig-post { padding-bottom: 14px; }
.ig-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 8px 12px; }
.ig-who { display: flex; align-items: center; gap: 9px; padding: 0; border: 0; background: none; color: #000; text-align: left; font-size: 13.5px; }
.ig-who > div { display: grid; line-height: 1.25; }
.ig-who small { color: #737373; font-size: 11.5px; }
.ig-photo { aspect-ratio: 4 / 5; }
.ig-actions { display: flex; align-items: center; gap: 14px; padding: 8px 12px 4px; }
.ig-act { display: flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: #000; font-size: 13.5px; font-weight: 600; }
.ig-act.like[aria-pressed="true"] { color: #ff3040; }
.ig-act.like[aria-pressed="true"] svg { fill: currentColor; }
.ig-act.like[aria-pressed="true"] small { color: #000; }
.ig-spacer { flex: 1; }
.ig-caption { margin: 4px 12px 0; font-size: 14px; line-height: 1.4; white-space: pre-line; }
.ig-more { margin: 4px 12px 0; color: #737373; font-size: 14px; }
.ig-time { display: block; margin: 4px 12px 0; color: #737373; font-size: 11.5px; }
.ig-tabs { flex: none; display: flex; justify-content: space-around; align-items: center; padding: 10px 0 30px; border-top: .5px solid #dbdbdb; background: #fff; }
.ig-tabs span { display: grid; color: #000; }
.ig-tabs span:not(.on) svg { stroke-width: 1.6; }
.ig-tabs span.on svg { stroke-width: 2.4; }
.ig-prof { display: flex; align-items: center; gap: 24px; padding: 14px 16px 10px; }
.ig-stats { flex: 1; display: flex; justify-content: space-around; text-align: center; }
.ig-stats span { display: grid; }
.ig-stats b { font-size: 17px; }
.ig-stats small { font-size: 13px; }
.ig-bio { display: grid; gap: 1px; padding: 0 16px; font-size: 14px; line-height: 1.4; }
.ig-bio small { color: #737373; }
.ig-bio p { margin: 0; }
.ig-buttons { display: flex; gap: 6px; padding: 12px 16px 6px; }
.ig-buttons > * { flex: 1; padding: 8px; border: 0; border-radius: 8px; font-size: 14px; font-weight: 600; text-align: center; }
.ig-buttons .blue { background: #0095f6; color: #fff; }
.ig-buttons .gray { background: #efefef; color: #000; }
.ig-stories.highlights { border-bottom: 0; padding-top: 10px; }
.ig-ptabs { display: flex; border-bottom: .5px solid #dbdbdb; }
.ig-ptabs span { flex: 1; display: grid; place-items: center; padding: 10px 0; color: #737373; }
.ig-ptabs span.on { color: #000; box-shadow: inset 0 -1.5px #000; }
.ig-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
.ig-tile { position: relative; overflow: hidden; aspect-ratio: 3 / 4; padding: 0; border: 0; }
.ig-tile.old { opacity: .55; }

/* Postype (feeds.js): ☰ 포스타입 + icons on top, post rows with thumbnails, bottom tabs */
.app-body.app-postype { background: #fff; overflow: hidden; color: #111; }
.pt-top { flex: none; display: flex; align-items: center; gap: 14px; min-height: 96px; padding: 50px 16px 6px; }
.pt-top svg { width: 24px; height: 24px; fill: none; stroke: #111; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pt-title { font-size: 21px; font-weight: 800; letter-spacing: -.5px; }
.pt-title.small { font-size: 17px; font-weight: 700; }
.pt-spacer { flex: 1; }
.pt-ico { display: grid; place-items: center; padding: 0; border: 0; background: none; }
.pt-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.pt-tabs { display: flex; gap: 22px; padding: 4px 16px 0; border-bottom: 1px solid #eee; font-size: 16px; color: #888; }
.pt-tabs span { padding: 8px 0 10px; }
.pt-tabs .on { color: #111; font-weight: 700; box-shadow: inset 0 -2.5px #111; }
.pt-card { display: flex; gap: 14px; align-items: flex-start; width: 100%; padding: 18px 16px; border: 0; border-bottom: 1px solid #f0f0f0; background: #fff; color: inherit; text-align: left; }
.pt-card-text { flex: 1; min-width: 0; display: grid; gap: 6px; }
.pt-card-text > b { font-size: 16.5px; line-height: 1.4; }
.pt-card-text > p { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #777; font-size: 14px; line-height: 1.5; }
.pt-thumb { position: relative; overflow: hidden; flex: none; width: 84px; height: 84px; border-radius: 10px; }
.pt-channel, .pt-author { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #555; }
.pt-channel small { flex: none; white-space: nowrap; color: #999; } /* "· date" stays together */
.pt-card-text > .pt-channel { min-width: 0; } /* a grid item: lets a long name shrink instead of pushing the date under the picture */
.pt-channel b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-avatar { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #e9e9ee; color: #777; font-style: normal; font-size: 11px; }
.pt-counts { display: flex; gap: 14px; color: #555; font-size: 13px; }
.pt-counts span { display: flex; align-items: center; gap: 4px; }
.pt-counts svg, .pt-bar svg { width: 19px; height: 19px; fill: none; stroke: #222; stroke-width: 1.7; stroke-linejoin: round; }
.pt-nav { flex: none; display: flex; justify-content: space-around; padding: 8px 4px 28px; border-top: 1px solid #eee; background: #fff; }
.pt-nav span { display: grid; justify-items: center; gap: 3px; color: #555; }
.pt-nav span:first-child { padding-right: 10px; border-right: 1px solid #e5e5e5; }
.pt-nav svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.pt-nav small { font-size: 10.5px; }
.pt-nav .on { color: #111; font-weight: 700; }
.pt-nav .on svg { stroke-width: 2.3; }
.pt-post { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 18px 20px; }
.pt-tag { display: inline-block; margin-bottom: 8px; padding: 3px 8px; border-radius: 6px; background: #f3f3f5; color: #666; font-size: 12px; }
.pt-post h2 { margin: 0 0 16px; font-size: 22px; line-height: 1.4; }
.pt-author { padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid #eee; font-size: 14px; color: #111; }
.pt-author .pt-avatar { width: 36px; height: 36px; }
.pt-author > div { display: grid; gap: 2px; }
.pt-author small { color: #999; font-size: 12px; }
.pt-sub { margin-left: auto; padding: 5px 12px; border-radius: 16px; background: #f3f3f5; color: #555; font-size: 12.5px; }
.pt-post p { margin: 0 0 14px; line-height: 1.85; font-size: 15.5px; }
.pt-bar { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 12px 18px 30px; border-top: 1px solid #eee; }

/* ===== Dark mode (2026-11-12): the phone is in dark appearance, so every app uses its own dark theme.
   Overrides the light rules above; Cosmo, the lock screen, scenes and endings were dark already. ===== */
:root { color-scheme: dark; }
.glass { background: #000; color: #fff; }
.status { color: #fff; }
#home span { background: #fff; }
#sleep { background: #ffffff26; }
#storage-status { background: #2c2c2e; color: #ff6961; }

/* iOS shared: navigation bar, choices, input, alerts, notifications, onboarding */
.app-head { background: #161616f0; border-bottom-color: #38383a; }
.app-head h1 { color: #fff; }
.choices { background: #1c1c1e; border-top-color: #38383a; }
.choices button:not(.primary) { background: #2c2c2e; border-color: #3a3a3c; color: #fff; }
.free-input input { background: #1c1c1e; border-color: #3a3a3c; color: #fff; }
.hint { color: #98989f; }
.overlay-card { background: #252527f5; }
.overlay-card p { color: #ebebf5cc; }
.secondary { background: #3a3a3c; color: #fff; }
.primary:disabled { background: #3a3a3c; color: #8e8e93; }
.noti { background: #1e1e1ed0; color: #fff; }
.noti-head small { color: #ebebf599; }
.onboard { background: #000; }
.onboard-sub, .setup-field span, .onb-type > span { color: #98989f; }
.name-input { background: #1c1c1e; color: #fff; }
.onb-notice li { background: #1c1c1e; color: #c7c7cc; }
.lang-pick { background: #1c1c1e; }
.lang-pick button { color: #c7c7cc; }
.lang-pick button.on { background: #3a3a3c; color: #fff; }
.onb-notice b { color: #fff; }
.onb-type input { background: #1c1c1e; border-color: #3a3a3c; color: #fff; }
.error { color: #ff6961; }

/* KakaoTalk dark */
.app-head.app-kakao { background: #171717; }
.app-head.app-kakao .back { color: #eee; }
.app-head.app-kakao::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 24' fill='none' stroke='%23eee' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='6.5'/%3E%3Cpath d='M15 15l5 5M42 4v16M34 12h16M74 3v3M74 18v3M65 12h3M80 12h3M67.6 5.6l2.1 2.1M78.3 16.3l2.1 2.1M67.6 18.4l2.1-2.1M78.3 7.7l2.1-2.1'/%3E%3Ccircle cx='74' cy='12' r='5.5'/%3E%3Ccircle cx='74' cy='12' r='2'/%3E%3C/svg%3E"); }
.app-head.app-kakao.sub { background: #232a33; border-color: #232a33; }
.app-head.app-kakao.sub::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 24' fill='none' stroke='%23eee' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='6.5'/%3E%3Cpath d='M15 15l5 5M40 6h16M40 12h16M40 18h16'/%3E%3C/svg%3E"); }
.app-body.app-kakao { background: #171717; }
.app-kakao .chat-row { background: #171717; }
.app-kakao .avatar, .app-kakao .sender::before { background-color: #4f5a66; }
.app-kakao .avatar.group { background-color: #46515d; }
.app-kakao .chat-row-text span { color: #9a9a9a; }
.chat-count, .chat-row-end small { color: #8a8a8a; }
.kakao-tabs { background: #171717; border-top-color: #2a2a2a; }
.kakao-tabs span { color: #7a7a7a; }
.kakao-tabs .on { color: #fff; }
.app-body.app-kakao .messages { background: #232a33; }
.app-kakao .sender { color: #c6ced7; }
.app-kakao .message { background: #3a4048; color: #fff; }
.app-kakao .bubble.first .message::before { border-top-color: #3a4048; }
.app-kakao .message.me { background: #fee500; color: #111; }
.app-kakao .typing { background: #3a4048b3; color: #c6ced7; }
.app-kakao .stamp { color: #8a96a3; }
.app-kakao .day-divider { background: #ffffff1f; }
.app-kakao .composer { background: #171717; border-top-color: #2a2a2a; }
.app-kakao .composer span { background: #2a2a2a; color: #777; }
.app-kakao .composer i, .app-kakao .composer b { color: #aaa; }

/* Messages (iOS) dark */
.app-body.app-sms { background: #000; }
.app-sms .chat-row { background: #000; }
.app-sms .chat-row + .chat-row { box-shadow: inset 74px .5px 0 #000, inset 0 .5px 0 #38383a; }
.app-sms .message:not(.me), .app-sms .typing { background: #262628; color: #fff; }
.app-sms .composer { background: #000; border-top-color: #1c1c1e; }
.app-sms .composer i { background: #1c1c1e; }
.app-sms .composer span { border-color: #3a3a3c; color: #636366; }

/* Naver, Photos dark */
.app-body.app-portal, .app-body.app-photos { background: #121212; color: #e6e6e6; }
.search input { background: #1e1e1e; border-color: #333; color: #fff; }
.result { background: #121212; border-bottom-color: #2a2a2a; color: #e6e6e6; }
.result small { color: #19ce60; }
.article small, .photo-date { color: #8e8e93; }
.day-pill { background: #ffffff14; color: #a1a1a6; }

/* Coupang dark */
.app-body.app-shop { background: #121212; color: #eee; }
.cp-search { color: #eee; background-color: #1e1e1e; }
.cp-sorts { border-bottom-color: #2a2a2a; }
.cp-sorts span { border-color: #3a3a3a; color: #ccc; }
.cp-sorts .on { border-color: #4d8bff; color: #6b9dff; }
.cp-row { background: #121212; border-bottom-color: #2a2a2a; }
.cp-thumb, .cp-hero { border-color: #2a2a2a; } /* product photos stay on white, as in the app */
.cp-name { color: #eee; }
.cp-off s, .cp-stars small { color: #999; }
.cp-now b { color: #ff5a5a; }
.cp-rocket, .cp-seller { color: #5aa2ff; }
.cp-arrive { color: #3ccf5b; }
.cp-stars { color: #444; }
.cp-free, .cp-desc { color: #aaa; }
.cp-desc { border-top-color: #2a2a2a; }
.cp-tabs, .cp-bar { background: #121212; border-top-color: #2a2a2a; }
.cp-tabs span { color: #888; }
.cp-tabs .on { color: #fff; }
.cp-cart { border-color: #4d8bff; color: #6b9dff; }
.cp-buy:disabled { background: #3a3a3c; }

/* Postype dark */
.app-body.app-postype { background: #121212; color: #eee; }
.pt-top svg, .pt-counts svg, .pt-bar svg { stroke: #eee; }
.pt-tabs { border-bottom-color: #2a2a2a; color: #777; }
.pt-tabs .on { color: #fff; box-shadow: inset 0 -2.5px #fff; }
.pt-card { background: #121212; border-bottom-color: #222; }
.pt-card-text > p { color: #999; }
.pt-channel, .pt-counts { color: #aaa; }
.pt-avatar { background: #2c2c2e; color: #aaa; }
.pt-nav { background: #121212; border-top-color: #2a2a2a; }
.pt-nav span { color: #888; }
.pt-nav span:first-child { border-right-color: #2a2a2a; }
.pt-nav .on { color: #fff; }
.pt-tag, .pt-sub { background: #2c2c2e; color: #bbb; }
.pt-author { border-bottom-color: #2a2a2a; color: #eee; }
.pt-bar { border-top-color: #2a2a2a; }

/* Instagram dark */
.app-body.app-sns { background: #000; color: #f5f5f5; }
.ig-ico, .ig-act, .ig-tabs span, .ig-who, .ig-story { color: #f5f5f5; }
.ig-act.like[aria-pressed="true"] small { color: #f5f5f5; }
.ig-top.sub, .ig-stories, .ig-ptabs { border-color: #262626; }
.ig-tabs { background: #000; border-top-color: #262626; }
.ig-ring i { border-color: #000; background: linear-gradient(160deg, #3a3a3c, #2a2a2c); color: #ccc; }
.ig-ring.seen { background: #363636; }
.ig-ring.tiny { background: #f5f5f5; }
.ig-ring em { border-color: #000; }
.ig-who small, .ig-more, .ig-time, .ig-sub-title small, .ig-bio small { color: #a8a8a8; }
.ig-ptabs span { color: #a8a8a8; }
.ig-ptabs span.on { color: #f5f5f5; box-shadow: inset 0 -1.5px #f5f5f5; }
.ig-buttons .gray { background: #363636; color: #f5f5f5; }

/* X dark ("Lights out") */
.app-body.app-x { background: #000; color: #e7e9ea; }
.xx-top, .xx-post, .xx-feedtabs.four, .xx-notice, .xx-audience { border-color: #2f3336; }
.xx-feedtabs span, .xx-post-head span, .xx-note p, .xx-actions, .xx-account span, .xx-muted, .xx-follow, .xx-trend small, .xx-searchbox { color: #71767b; }
.xx-feedtabs .on, .xx-follow b, .xx-tabs button { color: #e7e9ea; }
.xx-tabs { background: #000; border-top-color: #2f3336; }
.xx-avatar { background: #333639; }
.xx-avatar.big { border-color: #000; }
.xx-image, .xx-note, .xx-pill { border-color: #2f3336; }
.xx-pill { border-color: #536471; }
.xx-searchbox { background: #202327; }
.xx-draft { background: #000; border-color: #2f3336; color: #e7e9ea; }
.xx-draft[aria-pressed="true"] { background: #031018; }
.xx-cancel { color: #e7e9ea; }

/* Settings dark (iOS grouped list) */
.app-body.app-settings, .app-head.app-settings { background: #000; }
.set-group { background: #1c1c1e; }
.set-row { color: #fff; border-bottom-color: #38383a; }
.set-row.on::after, .set-link { color: #0a84ff; }
.set-label, .set-note { color: #8d8d93; }

/* tripleS official (Instagram + X): the mark as avatar, real profile details */
.ig-ring i.logo, .xx-avatar.logo { background: #000; color: #fff; font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Music", serif; font-weight: 400; }
.ig-ring.big i.logo { font-size: 46px; }
.ig-ring.small i.logo { font-size: 20px; }
.ig-ring.mini { width: 22px; height: 22px; padding: 0; background: none; }
.ig-ring.mini i { border-width: 1.5px; font-size: 9px; }
.ig-ring i.hl { background: #000; color: #fff; font-size: 8.5px; font-weight: 700; line-height: 1.1; text-align: center; padding: 4px 1px; overflow: hidden; letter-spacing: -.3px; } /* room for one-word titles like <LOVE&POP> */
.ig-side { flex: 1; display: grid; gap: 8px; }
.ig-fullname { font-size: 15px; }
.ig-side .ig-stats { justify-content: space-between; text-align: left; }
.ig-link { font-weight: 600; }
.ig-followed { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.ig-faces { display: flex; }
.ig-faces .ig-ring + .ig-ring { margin-left: -6px; }
.ig-followed small { color: inherit !important; font-size: 12.5px; }
.ig-buttons .small { flex: none; width: 40px; padding: 8px 0; font-size: 12px; }
.ig-tile.pinned em { position: absolute; top: 6px; right: 6px; z-index: 1; font-style: normal; font-size: 13px; }
.xx-avatar.logo { font-size: 24px; }
.xx-avatar.big.logo { font-size: 46px; }
.xx-verified { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 2px; border-radius: 50%; background: #1d9bf0; color: #fff; font-size: 10px; font-weight: 700; }
.xx-tap { cursor: pointer; }
.xx-banner.official { display: flex; align-items: center; padding-left: 20px; background: linear-gradient(135deg, #c7988e, #8e5f58); }
.xx-banner-text { color: #fff; font: 300 28px/1 Georgia, serif; letter-spacing: 1px; opacity: .85; }
.xx-tools { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.xx-circle { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #536471; border-radius: 50%; font-size: 14px; }
.xx-tools .xx-pill { margin-top: 0; background: none; color: inherit; }
.xx-tools .xx-pill.solid { background: #eff3f4; color: #0f1419; border-color: #eff3f4; }
.xx-blue { color: #1d9bf0; }
.xx-linkline { margin: 0 16px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xx-post > .xx-me { align-self: flex-start; }
.xx-small { font-size: 13px; }
.xx-pinned { margin: 10px 16px -6px 66px; color: #71767b; font-size: 13px; font-weight: 700; }
.xx-bio p { margin: 0; }
.ig-ring i { position: relative; overflow: hidden; } /* a photo (pictures.js) fills the inner circle */
.cx-live.has-pic > :not(img) { z-index: 1; } .cx-live.has-pic > i { position: relative; text-shadow: 0 2px 8px #0008; } /* play button and labels over the photo */

/* Cosmo shop: a member's pack of 4 cards, 2 by 2 (cosmo.js packView) */
.cx-pack { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; width: 74%; }
.cx-pack .cx-objekt { border-radius: 2px; }
.cx-packet { position: absolute; z-index: 2; right: -9%; bottom: -14%; width: 24%; aspect-ratio: 3 / 4; border-radius: 3px; background: linear-gradient(160deg, #f4f4f6, #c8c8ce); box-shadow: 0 2px 6px #0008; }
.cx-packet::before { content: ''; position: absolute; left: 14%; right: 14%; top: 14%; height: 12%; background: #d6262b; }
.cx-pack .cx-band { display: none; }
.cx-pack .cx-objekt-mark { font-size: 16px; }

/* X photos (official posts only): 1 to 4 in a rounded grid like the app; video stills get a ▶ */
.xx-media { position: relative; display: grid; gap: 2px; margin-top: 10px; border: 1px solid #2f3336; border-radius: 16px; overflow: hidden; }
.xx-media.n1 .xx-cell { aspect-ratio: auto; height: auto; }
.xx-media.n1 .xx-cell .pic { position: static; height: auto; max-height: 420px; }
.xx-media.n2, .xx-media.n4 { grid-template-columns: 1fr 1fr; }
.xx-media.n3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.xx-media.n3 .xx-cell:first-child { grid-row: span 2; }
.xx-cell { position: relative; overflow: hidden; aspect-ratio: 1; background: #16181c; }
.xx-media.n3 .xx-cell { aspect-ratio: auto; min-height: 110px; }
.xx-play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: #1d9bf0; color: #fff; font-style: normal; font-size: 22px; box-shadow: 0 0 0 4px #ffffff40; }

/* Cosmo shop list (like the real web shop): dark tile with the pack, then name + range, collection, price, class */
.cx-shop-grid { gap: 22px 10px; }
.cx-shop-tile { display: grid; place-items: center; aspect-ratio: 1; margin-bottom: 8px; border: 1px solid #ffffff12; border-radius: 14px;
  background: radial-gradient(closest-side, #ffffff26, transparent 75%), #15171b; }
.cx-shop-tile > .cx-objekt { width: 52%; }
.cx-shop-name { font-size: 15px; }
.cx-shop-grid .cx-cell > span { color: #a7a7ad; font-size: 13.5px; }
.cx-shop-grid .cx-cell > .owned { color: var(--cx-violet); font-weight: 700; }
.cx-class { margin: 6px 0 0; color: #a7a7ad; font-size: 12px; }
.cx-class b { color: var(--cx-violet); font-weight: 500; }
.cx-count { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 0 12px; }
.cx-count b { font-size: 16px; }
.cx-count span { color: var(--cx-dim); font-size: 12.5px; }
.cx-chips button.on, .cx-chips span.on { background: #fff; color: #111; }

/* Naver (feeds.js), dark like the app: the app header is replaced by .nv-top */
.app-head.app-portal { display: none; }
.app-body.app-portal { overflow: hidden; padding-bottom: 0; background: #121314; color: #e4e5e7; }
.nv-top { flex: none; display: flex; align-items: center; gap: 12px; min-height: 92px; padding: 50px 16px 6px; }
.nv-top .end { margin-left: auto; }
.nv-ico { display: grid; place-items: center; padding: 0; border: 0; background: none; color: #e4e5e7; }
.nv-top svg, .nv-lens svg, .nv-go svg, .nv-nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nv-pay { padding: 2px 7px; border: 1.6px solid currentColor; border-radius: 11px; font: 700 12px/1.2 Arial, sans-serif; }
.nv-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 20px; }
.app-portal .search { display: flex; align-items: center; gap: 10px; margin: 6px 14px 14px; padding: 12px 14px; border: 0; border-radius: 30px; background: #2a2c30; box-shadow: 0 2px 14px #0006; }
.nv-logo { color: #03c75a; font: 900 24px/1 Arial, sans-serif; }
.app-portal .search input { flex: 1; min-width: 0; padding: 4px 0; border: 0; background: none; color: #fff; font-size: 16px; outline: none; }
.app-portal .search input:focus-visible { outline: none; }
.app-portal .search:focus-within { box-shadow: 0 0 0 2px #03c75a; }
.nv-lens { color: #1ec8c8; display: grid; }
.nv-go { display: grid; place-items: center; padding: 0; border: 0; background: none; color: #03c75a; }
.nv-cards { display: flex; gap: 8px; overflow-x: auto; padding: 0 14px 14px; scrollbar-width: none; }
.nv-card { flex: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: #1f2023; }
.nv-card div { display: grid; }
.nv-card b { font-size: 14px; }
.nv-card small { color: #8b8f96; font-size: 12px; }
.nv-card i { font-style: normal; font-size: 22px; }
.app-portal .result-list h3 { margin: 6px 16px 4px; font-size: 17px; }
.app-portal .result { display: grid; gap: 5px; width: 100%; padding: 14px 16px; border: 0; border-bottom: 1px solid #222428; background: none; color: inherit; text-align: left; }
.app-portal .result small { display: flex; align-items: center; gap: 6px; color: #8b8f96; font-size: 12.5px; }
.app-portal .result b { color: #8ab4ff; font-size: 16px; font-weight: 600; line-height: 1.4; }
.nv-snip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #b5b8bd; font-size: 13.5px; line-height: 1.5; }
.nv-press-logo { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; background: #2f3236; color: #cfd2d6; font-style: normal; font-size: 10px; font-weight: 700; }
.nv-cats { display: flex; gap: 18px; overflow-x: auto; padding: 0 16px; border-bottom: 1px solid #222428; scrollbar-width: none; }
.nv-cats span { flex: none; padding: 8px 0 10px; color: #8b8f96; font-size: 15px; }
.nv-cats .on { color: #03c75a; font-weight: 700; box-shadow: inset 0 -2.5px #03c75a; }
.app-portal .article { padding: 8px 18px 24px; }
.nv-press { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; }
.nv-press .nv-press-logo { width: 26px; height: 26px; font-size: 13px; }
.app-portal .article h2 { margin: 0 0 10px; font-size: 21px; line-height: 1.4; color: #fff; }
.nv-date { display: block; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid #2a2c30; color: #8b8f96; font-size: 12.5px; }
.app-portal .article p { color: #d6d8db; }
.nv-react { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; padding-top: 16px; border-top: 1px solid #2a2c30; }
.nv-react span { padding: 6px 10px; border: 1px solid #2f3236; border-radius: 16px; color: #b5b8bd; font-size: 12.5px; }
.nv-nav { flex: none; display: flex; justify-content: space-around; padding: 8px 4px 28px; border-top: 1px solid #222428; background: #121314; }
.nv-nav span { display: grid; justify-items: center; gap: 3px; color: #8b8f96; }
.nv-nav span:first-child { padding-right: 12px; border-right: 1px solid #2a2c30; }
.nv-nav small { font-size: 10.5px; }
.nv-nav .on { color: #fff; font-weight: 700; }

/* Messages (iOS 18, dark): large-title list, unread dots, chevrons; chat with grey and blue bubbles with tails */
.app-head.app-sms:not(.sub) { display: none; }
.ms-head { flex: none; padding: 50px 16px 6px; background: #000; }
.ms-bar { display: flex; justify-content: space-between; align-items: center; min-height: 34px; color: #0a84ff; font-size: 17px; }
.ms-compose { width: 22px; height: 22px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a84ff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4H5a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-7'/%3E%3Cpath d='M18.5 2.5a2.1 2.1 0 0 1 3 3L12 15l-4 1 1-4z'/%3E%3C/svg%3E"); }
.ms-head h2 { margin: 2px 0 8px; font-size: 34px; font-weight: 700; letter-spacing: .3px; color: #fff; }
.ms-search { padding: 8px 10px 8px 34px; border-radius: 10px; color: #8e8e93; font-size: 17px;
  background: #1c1c1e no-repeat 10px 50% / 17px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E"); }
.app-sms .chat-list { padding-top: 4px; }
.app-sms .chat-row { position: relative; padding: 10px 16px 10px 26px; }
.app-sms .chat-row.unread::before { content: ''; position: absolute; left: 8px; top: 50%; translate: 0 -50%; width: 10px; height: 10px; border-radius: 50%; background: #0a84ff; }
.app-sms .avatar { width: 44px; height: 44px; font-size: 18px; background: linear-gradient(#8e939b, #6b7078); }
.app-sms .chat-row-text b { font-size: 17px; }
.app-sms .chat-row-text span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; color: #8e8e93; font-size: 15px; line-height: 1.3; }
.app-sms .chat-row-end small { color: #8e8e93; font-size: 15px; }
.app-sms .chat-row-end small::after { content: ' ›'; color: #5a5a5f; font-size: 18px; }
.app-sms .chat-row + .chat-row { box-shadow: inset 86px .5px 0 #000, inset 0 .5px 0 #38383a; }
.app-head.app-sms.sub { background: #1c1c1ef0; border-bottom-color: #2c2c2e; }
.app-head.app-sms.sub h1 { color: #fff; }
.app-head.app-sms.sub h1::after { content: '›'; margin-top: -2px; color: #8e8e93; font-size: 11px; }
.app-head.app-sms.sub h1::before { background: linear-gradient(#8e939b, #6b7078); }
.app-sms .messages { background: #000; }
.app-sms .message { position: relative; padding: 7px 12px; border-radius: 18px; font-size: 16px; line-height: 1.35; }
.app-sms .bubble.me .message { background: #0a84ff; color: #fff; }
.app-sms .bubble:not(.me) .message { background: #262628; color: #fff; }
.app-sms .message:not(.me), .app-sms .message.me { border-bottom-left-radius: 18px; border-bottom-right-radius: 18px; }
/* tails on the last bubble of each run, like iOS */
.app-sms .bubble:not(.me):has(+ .bubble.me, + .day-divider, + .sender, + .read-mark) .message,
.app-sms .bubble:not(.me):last-child .message { border-bottom-left-radius: 4px; }
.app-sms .bubble.me:has(+ .bubble:not(.me), + .day-divider, + .read-mark) .message,
.app-sms .bubble.me:last-child .message { border-bottom-right-radius: 4px; }
.app-sms .read-mark { color: #8e8e93; font-size: 11.5px; }
.app-sms .day-divider { color: #8e8e93; font-size: 11.5px; font-weight: 500; }
.app-sms .typing { border-radius: 18px; background: #262628; color: #8e8e93; }
.app-sms .composer { gap: 8px; padding: 7px 10px 32px; background: #000; border-top: 0; }
.app-sms .composer i { width: 34px; height: 34px; border-radius: 50%; background: #2c2c2e; color: #c7c7cc; font-size: 24px; font-weight: 300; }
.app-sms .composer span { position: relative; padding: 7px 36px 7px 14px; border: 1px solid #3a3a3c; border-radius: 18px; color: #636366; font-size: 16px; }
.ms-mic { position: relative; margin-left: -44px; width: 30px; height: 22px; background: no-repeat center / 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round'%3E%3Crect x='9' y='3' width='6' height='11' rx='3'/%3E%3Cpath d='M5 11a7 7 0 0 0 14 0M12 18v3'/%3E%3C/svg%3E"); }
.app-sms .choices { background: #000; border-top-color: #1c1c1e; }
.app-portal .search .nv-go { border-radius: 0; padding: 0; background: none; color: #03c75a; } /* an icon, not the old green button */
.ig-sub-title.ig-name { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }

/* Naver home and news page (screenshots of the app, kept dark like every app) */
.nv-spacer { flex: 1; }
.nv-qr { padding: 3px 8px; border: 1px solid #3a3d42; border-radius: 12px; font-size: 11px; color: #cfd2d6; }
.nv-nbox { display: grid; place-items: center; width: 22px; height: 22px; border: 1.6px solid #cfd2d6; border-radius: 5px; font: 900 12px/1 Arial, sans-serif; color: #cfd2d6; }
.nv-bell { position: relative; margin-left: 0 !important; }
.nv-bell::after { content: ''; position: absolute; right: 2px; top: 2px; width: 6px; height: 6px; border-radius: 50%; background: #ff4b4b; }
.nv-na { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(140deg, #03c75a, #1ec8c8); color: #fff; font: 800 12px/1 Arial, sans-serif; }
.nv-home { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 14px 12px; }
.nv-grow { flex: 1; }
.app-portal .search.home { margin: 0; padding: 10px 14px; border: 2px solid #03c75a; border-radius: 26px; background: #121314; box-shadow: none; }
.app-portal .search.home .nv-go { display: none; } /* Enter searches, like the app's keyboard */
.nv-promo { display: grid; justify-items: center; gap: 2px; margin: 14px 0 0; }
.nv-promo b { font-size: 13px; }
.nv-promo small { color: #8b8f96; font-size: 11.5px; }
.nv-weather { display: flex; align-items: baseline; gap: 8px; padding: 14px 16px; border-radius: 14px; background: #1f2023; }
.nv-weather i { font-style: normal; font-size: 22px; align-self: center; }
.nv-weather b { font-size: 16px; }
.nv-weather small { color: #8b8f96; font-size: 12.5px; }
.nv-nav button, .nv-nav span { display: grid; justify-items: center; gap: 3px; padding: 0; border: 0; background: none; color: #8b8f96; font: inherit; }
.nv-nav button:first-child, .nv-nav span:first-child { padding-right: 12px; border-right: 1px solid #2a2c30; }
.nv-nav .on { color: #fff; font-weight: 700; }
.nv-top.news { gap: 16px; border-bottom: 1px solid #222428; padding-bottom: 0; }
.nv-logo.big { font-size: 28px; padding-bottom: 8px; }
.nv-newstabs { display: flex; gap: 18px; min-width: 0; overflow: hidden; } /* never pushes the search button off */
.nv-newstabs span { padding: 4px 0 12px; color: #e4e5e7; font-size: 19px; font-weight: 700; }
.nv-newstabs .on { color: #03c75a; box-shadow: inset 0 -3px #03c75a; }
.nv-ico.green { color: #03c75a; padding-bottom: 8px; }
.nv-ad { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: #1a1b1e; }
.nv-ad-pic { position: relative; overflow: hidden; flex: none; width: 96px; height: 64px; border-radius: 10px; background: #2a2c30; }
.nv-ad div:last-child { display: grid; gap: 2px; }
.nv-ad b { font-size: 15px; }
.nv-ad small { color: #8b8f96; font-size: 13px; }
.nv-edit { display: flex; align-items: center; gap: 8px; padding: 16px; border-bottom: 8px solid #1a1b1e; }
.nv-edit b { font-size: 18px; }
.nv-edit small { color: #8b8f96; font-size: 14px; white-space: nowrap; }
.nv-my { margin-left: auto; padding: 4px 12px; border: 1px solid #3a3d42; border-radius: 16px; font-size: 13px; }
.nv-presscard { padding: 14px 16px; }
.nv-presshead { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.nv-presslogo { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #1e3a8a; color: #fff; font-style: normal; font-size: 13px; font-weight: 800; }
.nv-presshead div { display: grid; }
.nv-presshead b { display: flex; align-items: center; gap: 6px; font-size: 19px; }
.nv-subs { padding: 1px 6px; border: 1px solid #b06bff; border-radius: 10px; color: #c58cff; font-style: normal; font-size: 11px; }
.nv-presshead small { color: #8b8f96; font-size: 12.5px; }
.app-portal .news .result { padding: 13px 2px; border-bottom: 1px solid #26282b; }
.app-portal .news .result small, .app-portal .news .result .nv-snip { display: none; }
.app-portal .news .result b { color: #e4e5e7; font-size: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-headline { margin: 0; padding: 13px 2px; border-bottom: 1px solid #26282b; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-clips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.nv-clip p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nv-clip-pic { position: relative; aspect-ratio: 3 / 2; border-radius: 10px; }
.nv-clip-pic span { position: absolute; right: 8px; bottom: 6px; color: #fff; font-size: 13px; font-weight: 700; text-shadow: 0 1px 3px #000a; }
.app-portal .search { flex: none; } /* a bar, not a filler */

/* Ending card: why this ending (contents.js why), key decisions (engine.remember), hidden numbers */
.ending-card { overflow-y: auto; justify-content: flex-start; padding-top: 64px; }
.ending-card > :first-child { margin-top: auto; }
.ending-card > :last-child { margin-bottom: auto; }
.ending-why { width: 100%; margin: 6px 0 4px; padding: 14px 16px; border-radius: 16px; background: #ffffff12; text-align: left; }
.ending-why h2 { margin: 0 0 6px; font-size: 14px; color: #f5c46b; }
.ending-why p { margin: 0; font-size: 14px; line-height: 1.6; color: #e6e6ee; }
.ending-why h3 { margin: 12px 0 6px; font-size: 13px; color: #b9b9c4; }
.ending-trail { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.ending-trail li { display: flex; gap: 10px; font-size: 13.5px; line-height: 1.45; }
.ending-trail small { flex: none; width: 38px; color: #9a9aa5; }
.ending-why .ending-stats { margin-top: 12px; color: #9a9aa5; font-size: 12.5px; }

/* Screenshots (capture.js): ◎ button, flash, corner toast; the framed phone's volume button works too */
.assist { position: absolute; z-index: 6; right: 12px; bottom: 120px; width: 46px; height: 46px; display: grid; place-items: center;
  padding: 0; border: 0; border-radius: 14px; background: #000000a6; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: .55; }
.assist:hover, .assist:focus-visible { opacity: 1; }
.assist i { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #ffffffd9; box-shadow: inset 0 0 0 4px #ffffff33; }
body[data-locked] .assist, body[data-onboarding] .assist { display: none; }
.hw-vol-up { cursor: pointer; }
.hw-vol-up:hover { background: #5a5a60; }
.shot-flash { position: absolute; z-index: 9; inset: 0; background: #fff; pointer-events: none; animation: shot-flash .45s ease-out forwards; }
@keyframes shot-flash { from { opacity: .9; } to { opacity: 0; } }
.shot-toast { position: absolute; z-index: 9; left: 14px; bottom: 44px; display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border-radius: 12px;
  background: #2c2c2ef0; color: #fff; font-size: 13px; box-shadow: 0 6px 20px #0008; animation: drop .3s ease-out; }
.shot-toast i { width: 26px; height: 40px; border-radius: 4px; border: 2px solid #fff; background: #48484a; }
@media (prefers-reduced-motion: reduce) { .shot-flash { animation-duration: .01s; } }

/* Screenshots in Photos (feeds.js shotView): a miniature of the captured page */
.photo-tile.shot { position: relative; overflow: hidden; padding: 0; background: #000; }
.shot-view { display: grid; align-content: start; gap: 6px; aspect-ratio: 9 / 16; width: 100%; max-height: 62vh; margin: 0 auto; padding: 18px 16px; overflow: hidden;
  border-radius: 14px; background: #121314; color: #e4e5e7; text-align: left; box-shadow: 0 0 0 1px #2a2c30; }
.app-photos .shot-view:not(.small) { width: min(78%, 300px); margin-top: 14px; }
.shot-app { color: #8b8f96; font-size: 11px; }
.shot-view b { font-size: 15px; line-height: 1.35; }
.shot-view p { margin: 0; color: #b5b8bd; font-size: 12.5px; line-height: 1.5; }
.shot-pic { display: block; aspect-ratio: 4 / 3; border-radius: 8px; }
.shot-view.small { position: absolute; inset: 0; aspect-ratio: auto; max-height: none; padding: 7px 6px; gap: 3px; border-radius: 0; box-shadow: none; }
.shot-view.small .shot-app { font-size: 7px; }
.shot-view.small b { font-size: 8.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.shot-view.small p { font-size: 7px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shot-view.small .shot-pic { border-radius: 3px; }

/* Face-to-face scenes with 소현 (day.js portrait): her photo on top, the dialogue below, like a visual novel */
.scene-portrait { position: relative; flex: none; height: 38%; min-height: 180px; margin: 0 14px 6px; overflow: hidden; border-radius: 18px;
  background: radial-gradient(120% 90% at 50% 20%, #3b3b52, #15151c); transition: filter .3s; }
.scene-portrait::after { content: ''; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(transparent, #101016); pointer-events: none; }
.scene-portrait.quiet { filter: brightness(.7); }
.scene-portrait[hidden] { display: none; }
.scene-silhouette { position: absolute; left: 50%; bottom: -10%; translate: -50% 0; width: 46%; aspect-ratio: 3 / 4; border-radius: 50% 50% 18% 18%;
  background: radial-gradient(circle at 50% 28%, #6a6a82 0 22%, transparent 23%), radial-gradient(ellipse at 50% 100%, #55556b 0 58%, transparent 59%); opacity: .8; }
.scene-name { position: absolute; z-index: 1; left: 14px; bottom: 10px; padding: 3px 10px; border-radius: 10px; background: #000a; color: #f5c46b; font-size: 12px; font-weight: 700; }
.scene-portrait.has-pic .scene-silhouette { display: none; }
.scene-portrait .pic { object-position: 50% 20%; }
.scene.with-portrait .scene-log { padding-top: 4px; }
/* Short phones: a smaller portrait leaves room for the dialogue. The ◎ button sits mid-right, clear of the choices at the bottom. */
@media (max-height: 700px) { .scene-portrait { height: 26%; min-height: 120px; } }
.assist { top: 46%; bottom: auto; right: 8px; width: 40px; height: 40px; border-radius: 12px; opacity: .45; }
.assist i { width: 22px; height: 22px; }

/* Screenshot pictures in Photos (capture.js) */
.shot-img { display: block; width: min(78%, 300px); max-height: 66vh; margin: 14px auto 0; object-fit: contain; border-radius: 16px; box-shadow: 0 6px 24px #0006; }
.shot-img.small { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; margin: 0; object-fit: cover; object-position: top; border-radius: 0; box-shadow: none; }

/* hidden always wins: some boxes (chat bubbles) set display, which would otherwise show lines still waiting to be typed */
[hidden] { display: none !important; }
/* A revealed line (engine.js reveal) and the typing dots slide up softly */
.arrive, .typing { animation: arrive .32s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes arrive { from { opacity: 0; translate: 0 14px; } }
@media (prefers-reduced-motion: reduce) { .arrive, .typing { animation: none; } }

/* Day select (day.js dayPicker): ending rows as buttons */
.day-row { width: 100%; border: 0; color: #fff; font: inherit; text-align: left; cursor: pointer; }
.day-row:active { background: #ffffff26; }

/* Instagram new post (feeds.js igNew): today's drafts, 공유 on the right */
.ig-share { margin-left: auto; padding: 4px 2px; border: 0; background: none; color: #0095f6; font: inherit; font-size: 16px; font-weight: 600; }
.ig-share:disabled { color: #0095f655; }
.ig-new { display: grid; align-content: start; gap: 10px; padding: 12px 14px; }
.ig-draft { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1.5px solid #ffffff1f; border-radius: 12px; background: none; color: #f5f5f5; font: inherit; font-size: 14px; line-height: 1.45; text-align: left; }
.ig-draft i { flex: none; width: 64px; aspect-ratio: 1; border-radius: 6px; }
.ig-draft[aria-pressed="true"] { border-color: #0095f6; background: #0095f61a; }
.ig-audience { margin: 4px 0 0; color: #a8a8a8; font-size: 12.5px; }
.cp-thought { color: #a1a1a6; border-left-color: #636366; }
.coach-card .coach-key { background: #3a3000; color: #ffd60a; }
