/* yuto's iPhone — visual system
   All colors are solid. No gradients are used anywhere. */

:root {
  --paper: #f0ece3;
  --paper-deep: #e7e1d5;
  --ink: #171512;
  --muted: #746c60;
  --line: rgba(23, 21, 18, 0.16);
  --screen-w: 390px;
  --screen-h: 812px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Apple SD Gothic Neo",
    "Malgun Gothic", sans-serif;
  --chat-bg: #aabfd2;
  --kakao-yellow: #ffe94a;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

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

img {
  -webkit-user-drag: none;
  user-select: none;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Desktop composition ---------- */

.page {
  min-height: 100dvh;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px clamp(24px, 4vw, 60px);
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 6vw, 96px);
}

.intro {
  padding: 8px 0;
}

.kicker {
  margin: 0 0 22px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.intro h1 {
  margin: 0 0 24px;
  font-size: clamp(58px, 6vw, 82px);
  line-height: 0.88;
  letter-spacing: -0.072em;
  font-weight: 650;
}

.lede {
  margin: 0;
  max-width: 34ch;
  font-size: 15px;
  line-height: 1.75;
  color: #3f3a32;
}

.meta {
  margin: 28px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
}

.meta > div {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  align-items: baseline;
}

.meta dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.meta dd {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: #5d5549;
}

.controls {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.controls-title {
  margin: 0 0 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.control-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.control-list li {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  align-items: baseline;
  font-size: 11.5px;
}

.control-list span {
  color: var(--muted);
}

.control-list b {
  font-weight: 550;
  color: #3b362e;
}

.control-buttons {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  padding: 8px 13px;
  font-size: 11.5px;
  font-weight: 600;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  outline: none;
}

.btn-quiet {
  border-style: dashed;
  color: var(--muted);
}

.btn:disabled {
  opacity: 0.38;
  cursor: default;
}

.btn:disabled:hover {
  background: transparent;
  border-color: var(--line);
  color: inherit;
}

.content-note {
  margin: 26px 0 0;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--muted);
}

.device-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

/* ---------- Device ---------- */

.device {
  position: relative;
  width: min(410px, 92vw, calc((100dvh - 128px) * 0.492));
  padding: 10px;
  border: 1px solid #2d2d2d;
  border-radius: 58px;
  background: #050505;
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.08) inset, 0 34px 80px rgba(35, 29, 20, 0.25),
    0 6px 18px rgba(35, 29, 20, 0.14);
}

.screen {
  position: relative;
  width: 100%;
  aspect-ratio: 390 / 812;
  overflow: hidden;
  border-radius: 49px;
  background: #000;
  isolation: isolate;
  touch-action: pan-y;
}

.side-btn,
.power-btn {
  position: absolute;
  z-index: 2;
  display: block;
  width: 3px;
  border-radius: 3px;
  background: #1b1b1b;
}

.side-btn-1 {
  left: -3px;
  top: 122px;
  height: 30px;
}

.side-btn-2 {
  left: -3px;
  top: 174px;
  height: 54px;
}

.side-btn-3 {
  left: -3px;
  top: 240px;
  height: 54px;
}

.power-btn {
  right: -3px;
  top: 188px;
  height: 86px;
}

.scene-label {
  margin: 17px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.13em;
  color: #80776a;
}

.scene-sep {
  opacity: 0.5;
}

/* ---------- Screen views ---------- */

.view {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
  background: #000;
}

.view.is-active {
  display: flex;
}

.view-lock.is-active,
.view-home.is-active,
.view-kakao.is-active {
  display: block;
}

.view-lock.is-under {
  z-index: 2;
}

.view-home.is-under {
  display: block;
  z-index: 1;
}

.view.is-entering {
  animation: view-in 0.28s cubic-bezier(0.22, 0.8, 0.24, 1) both;
}

.view.is-entering-back {
  animation: view-in-back 0.25s cubic-bezier(0.22, 0.8, 0.24, 1) both;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes view-in-back {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.screen-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

/* ---------- Lock ---------- */

.view-lock {
  background: #000;
}

.unlock-tray {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 116px;
  padding: 20px 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 7, 7, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #fff;
  touch-action: none;
  cursor: grab;
  z-index: 4;
}

.unlock-tray:active {
  cursor: grabbing;
}

.unlock-tray:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: -5px;
}

.unlock-hint {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.78);
}

.unlock-bar {
  display: block;
  width: 136px;
  height: 5px;
  border-radius: 4px;
  background: #fff;
}

/* ---------- Home ---------- */

.view-home {
  background: #000;
}

.view-home::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(8, 8, 10, 0.14);
  pointer-events: none;
}

.home-wallpaper {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: saturate(0.85) brightness(0.89);
}

.home-status {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: 48px;
  padding: 13px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.home-status-icons {
  color: #fff;
}

.home-island {
  top: 10px;
  width: 88px;
  height: 25px;
  background: #000;
}

.home-apps {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.home-app {
  position: absolute;
  width: 15.47%;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 10px;
  line-height: 1.12;
  font-weight: 500;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  pointer-events: auto;
  touch-action: manipulation;
}

.home-app[data-col="1"] {
  left: 7.55%;
}

.home-app[data-col="2"] {
  left: 30.76%;
}

.home-app[data-col="3"] {
  left: 53.24%;
}

.home-app[data-col="4"] {
  left: 76.44%;
}

.home-app[data-row="1"] {
  top: 10.4%;
}

.home-app[data-row="2"] {
  top: 25%;
}

.home-app[data-row="3"] {
  top: 39.6%;
}

.home-app[data-row="4"] {
  top: 54.2%;
}

.home-app img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));
  transition: transform 0.15s ease;
}

.home-app span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.home-app:active img {
  transform: scale(0.92);
}

.home-app:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.95);
  outline-offset: 3px;
  border-radius: 15px;
}

.home-pages {
  position: absolute;
  left: 50%;
  bottom: 15.2%;
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-pages i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.home-pages i.is-on {
  background: #fff;
}

.home-dock {
  position: absolute;
  left: 3.6%;
  right: 3.6%;
  bottom: 1.7%;
  z-index: 5;
  height: 12.2%;
  padding: 0 3.2%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.27);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
}

.home-dock-app {
  width: 17.2%;
  padding: 0;
  border: 0;
  background: transparent;
  touch-action: manipulation;
}

.home-dock-app img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));
  transition: transform 0.15s ease;
}

.home-dock-app:active img {
  transform: scale(0.92);
}

.home-dock-app:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.95);
  outline-offset: 3px;
  border-radius: 15px;
}

.home-bar {
  position: absolute;
  left: 50%;
  bottom: 6px;
  z-index: 6;
  width: 124px;
  height: 5px;
  transform: translateX(-50%);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
}

/* ---------- Native status bar ---------- */

.statusbar {
  position: relative;
  z-index: 8;
  flex: 0 0 50px;
  height: 50px;
  padding: 13px 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #0c0c0c;
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.dynamic-island {
  position: absolute;
  left: 50%;
  top: 10px;
  width: 88px;
  height: 25px;
  transform: translateX(-50%);
  border-radius: 16px;
  background: #000;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #0c0c0c;
}

.signal {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}

.signal i {
  display: block;
  width: 3px;
  border-radius: 1px;
  background: currentColor;
}

.signal i:nth-child(1) {
  height: 4px;
}

.signal i:nth-child(2) {
  height: 6px;
}

.signal i:nth-child(3) {
  height: 8px;
}

.signal i:nth-child(4) {
  height: 10px;
}

.wifi {
  width: 16px;
  height: 12px;
}

.battery {
  width: 22px;
  height: 11px;
  padding: 1px;
  border: 1.2px solid currentColor;
  border-radius: 3px;
}

.battery i {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: 1px;
  background: currentColor;
}

/* ---------- Instagram ---------- */

.view-instagram {
  flex-direction: column;
  background: #fff;
  color: #0b0b0b;
}

.ig-top {
  position: relative;
  z-index: 6;
  flex: 0 0 48px;
  height: 48px;
  padding: 0 15px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
}

.ig-logo {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.ig-tabs {
  position: absolute;
  left: 50%;
  bottom: 9px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
}

.ig-tab-active {
  position: relative;
  font-size: 13.5px;
  font-weight: 750;
}

.ig-tab-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 20px;
  height: 2px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: #111;
}

.ig-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ig-pill {
  height: 27px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: #f0f0f0;
  font-size: 11px;
  font-weight: 650;
}

.ig-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
}

.ig-icon svg {
  width: 21px;
  height: 21px;
}

.ig-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 84px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.ig-scroll::-webkit-scrollbar {
  display: none;
}

.ig-profile {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 5px 18px 17px;
}

.ig-avatar {
  width: 82px;
  height: 82px;
  flex: 0 0 82px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #ececec;
}

.ig-stats {
  flex: 1;
  display: flex;
  justify-content: space-around;
  gap: 8px;
}

.ig-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.ig-stats strong {
  font-size: 16px;
  font-weight: 750;
  line-height: 1.1;
}

.ig-stats span {
  font-size: 10.5px;
  color: #5d5d5d;
}

.ig-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px 10px;
}

.ig-section-head h2 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.ig-section-head button {
  border: 0;
  background: transparent;
  padding: 4px 0;
  font-size: 10.5px;
  font-weight: 600;
  color: #2b7e76;
}

.ig-section-head-last {
  margin-top: 7px;
}

.ig-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 9px;
  padding: 0 9px;
}

.ig-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.ig-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1.1 / 1;
  overflow: hidden;
  border-radius: 3px;
  background: #eee;
}

.ig-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.ig-card:active .ig-thumb img {
  transform: scale(1.025);
}

.ig-card:focus-visible {
  outline: 2px solid #111;
  outline-offset: 3px;
}

.ig-caption {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}

.ig-count {
  margin-top: 1px;
  font-size: 10.5px;
  color: #777;
}

.ig-grid-last {
  padding-bottom: 8px;
}

.ig-grid-last .ig-thumb {
  aspect-ratio: 1.85 / 1;
}

.ig-tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  height: 65px;
  padding: 8px 18px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: #fff;
  border-top: 1px solid #ededed;
}

.ig-tabbar button {
  width: 24%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: 0;
  background: transparent;
  padding: 0;
  color: #1e1e1e;
}

.ig-tabbar svg {
  width: 22px;
  height: 22px;
}

.ig-tabbar span {
  font-size: 9px;
  color: #4d4d4d;
}

.ig-tabbar button.is-active {
  color: #176f68;
}

.ig-tabbar button.is-active span {
  color: #176f68;
  font-weight: 650;
}

/* ---------- Notes ---------- */

.view-notes {
  flex-direction: column;
  background: #fff;
  color: #101010;
}

.notes-top,
.video-top {
  position: relative;
  flex: 0 0 44px;
  height: 44px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notes-back,
.video-back {
  width: 34px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #e5a800;
}

.notes-back svg,
.video-back svg {
  width: 23px;
  height: 23px;
}

.notes-heading,
.video-heading {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: 700;
}

.notes-done {
  font-size: 12px;
  font-weight: 600;
  color: #e5a800;
}

.notes-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 58px;
  background: #fff;
}

.notes-large,
.video-large {
  margin: 2px 18px 8px;
  font-size: 33px;
  line-height: 1.15;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.notes-search {
  height: 34px;
  margin: 0 14px 13px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 9px;
  background: #efefef;
  color: #85858a;
}

.notes-search svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.notes-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 12px;
  color: #101010;
}

.notes-section-label {
  margin: 0;
  padding: 0 18px 7px;
  color: #8b8b90;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.notes-list {
  padding: 0 12px;
}

.note-list-item {
  display: block;
  width: 100%;
  padding: 12px 8px 13px;
  border: 0;
  border-bottom: 1px solid #ececec;
  background: transparent;
  text-align: left;
}

.note-list-item:active {
  background: #f6f6f6;
}

.note-list-item b {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.note-list-item span {
  display: block;
  font-size: 10px;
  color: #8e8e93;
}

.notes-empty {
  margin: 36px 0;
  text-align: center;
  color: #999;
  font-size: 12px;
}

.notes-toolbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 24;
  height: 50px;
  padding: 0 28px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #ececec;
  background: rgba(250, 250, 250, 0.97);
  color: #e5a800;
  font-size: 20px;
}

.notes-plus {
  font-size: 25px;
  line-height: 1;
}

.note-detail-overlay {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  background: #fffdf7;
  color: #101010;
}

.note-detail-overlay[hidden] {
  display: none !important;
}

.note-detail-top {
  position: relative;
  flex: 0 0 44px;
  height: 44px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.note-detail-back {
  border: 0;
  background: transparent;
  padding: 0;
  color: #e5a800;
  font-size: 13px;
  font-weight: 550;
}

.note-detail-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 650;
}

.note-detail-done {
  border: 0;
  background: transparent;
  padding: 0;
  color: #e5a800;
  font-size: 12px;
  font-weight: 650;
}

.note-detail-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 24px 60px;
}

.note-detail-date {
  margin: 2px 0 8px;
  color: #a3a09a;
  font-size: 10px;
  text-align: center;
}

.note-detail-title {
  margin: 0 0 17px;
  font-size: 24px;
  line-height: 1.28;
  letter-spacing: -0.03em;
}

.note-detail-body {
  font-size: 13px;
  line-height: 1.9;
  color: #34312c;
  white-space: pre-wrap;
}

.note-detail-body .note-edit-date {
  margin: 16px 0 2px;
  color: #a3a09a;
  font-size: 10px;
}

.note-detail-body p {
  margin: 0 0 10px;
}

.note-detail-overlay .home-bar {
  background: #111;
  z-index: 48;
}

/* ---------- Video ---------- */

.view-video {
  flex-direction: column;
  background: #0d0d0f;
  color: #fff;
}

.video-statusbar {
  color: #fff;
}

.video-statusbar .dynamic-island {
  background: #000;
}

.video-top {
  color: #fff;
}

.video-back {
  color: #fff;
}

.video-more {
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.05em;
}

.video-library {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 62px;
}

.video-feature {
  position: relative;
  display: block;
  width: calc(100% - 28px);
  height: 190px;
  margin: 0 14px 16px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: #222;
  color: #fff;
  text-align: left;
}

.video-feature img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.video-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.16);
}

.video-feature-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding-left: 3px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  font-size: 18px;
}

.video-feature-title {
  position: absolute;
  left: 13px;
  bottom: 26px;
  z-index: 3;
  font-size: 15px;
  font-weight: 700;
}

.video-feature-meta {
  position: absolute;
  left: 13px;
  bottom: 10px;
  z-index: 3;
  color: rgba(255, 255, 255, 0.66);
  font-size: 9px;
}

.video-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 8px;
}

.video-section-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.video-section-head span {
  color: #8e8e93;
  font-size: 10px;
}

.video-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 14px;
}

.video-card {
  padding: 6px;
  border: 0;
  border-radius: 8px;
  background: #1a1a1d;
  color: #fff;
  text-align: left;
}

.video-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1.35 / 1;
  object-fit: cover;
  border-radius: 5px;
}

.video-card-title {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 650;
}

.video-card-meta {
  display: block;
  margin-top: 2px;
  color: #8e8e93;
  font-size: 9px;
}

.video-player {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: #000;
}

.video-player[hidden] {
  display: none !important;
}

.video-player video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.video-player-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 42px;
  z-index: 3;
  height: 44px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.video-player-top button {
  pointer-events: auto;
}

.video-player-back {
  width: 34px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}

.video-player-back svg {
  width: 23px;
  height: 23px;
}

.video-player-top span {
  font-size: 13px;
  font-weight: 600;
}

/* ---------- KakaoTalk list ---------- */

.view-kakao {
  background: #fff;
}

.row-hotspot {
  position: absolute;
  left: 0;
  z-index: 7;
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: transparent;
}

.row-self {
  top: 76.1%;
  height: 8.9%;
}

.row-g {
  top: 85.4%;
  height: 7.9%;
}

.row-hotspot:active {
  background: rgba(0, 0, 0, 0.06);
}

.row-hotspot:focus-visible {
  outline: 2px solid #111;
  outline-offset: -3px;
}

/* ---------- Chat ---------- */

.view-chat {
  --keyboard-h: 334px;
  flex-direction: column;
  background: var(--chat-bg);
}

.chat-header {
  position: relative;
  z-index: 12;
  flex: 0 0 auto;
  background: #f7f7f7;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.chat-header .statusbar {
  height: 46px;
  flex-basis: 46px;
  padding-top: 11px;
}

.chat-nav {
  position: relative;
  height: 49px;
  display: flex;
  align-items: center;
  padding: 0 10px;
}

.chat-back {
  width: 34px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  padding: 0;
  z-index: 2;
}

.chat-back svg {
  width: 23px;
  height: 23px;
}

.chat-person {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 62%;
}

.chat-avatar {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 11px;
  font-weight: 750;
  background: #fff;
  border: 1px solid #e1e1e1;
}

.chat-avatar.is-g {
  color: #111;
  letter-spacing: -0.05em;
}

.chat-avatar.is-cat {
  border: 0;
  background-image: url("assets/chat/cat-avatar.jpg");
  background-size: cover;
  background-position: center;
}

.chat-name {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.name-heart {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  margin-top: 1px;
}

.chat-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 11px;
  opacity: 0.85;
}

.chat-tools svg {
  width: 20px;
  height: 20px;
}

.chat-log {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 11px 24px;
  background: var(--chat-bg);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.date-pill {
  align-self: center;
  flex: 0 0 auto;
  margin: 14px 0 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(91, 116, 140, 0.58);
  color: #fff;
  font-size: 10.5px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.msg-row {
  display: flex;
  flex: 0 0 auto;
  width: 100%;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 7px;
  max-width: 100%;
}

.msg-row.is-new {
  animation: msg-in 0.2s ease both;
}

@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.msg-row.is-out {
  justify-content: flex-end;
  margin-left: auto;
}

.msg-avatar {
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  margin-top: 1px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 750;
  background: #fff;
  color: #111;
  border: 1px solid rgba(255, 255, 255, 0.65);
}

.msg-avatar.is-g {
  letter-spacing: -0.05em;
}

.msg-avatar.is-cat {
  border: 0;
  background-image: url("assets/chat/cat-avatar.jpg");
  background-size: cover;
  background-position: center;
}

.bubble {
  max-width: 73%;
  padding: 8px 10px;
  border-radius: 3px 12px 12px 12px;
  background: #fff;
  color: #101010;
  font-size: 14px;
  line-height: 1.38;
  word-break: break-word;
  white-space: pre-wrap;
}

.msg-row.is-out .bubble {
  max-width: 76%;
  border-radius: 12px 3px 12px 12px;
  background: var(--kakao-yellow);
}

.msg-row.is-image {
  padding-left: 35px;
}

.msg-row.is-image .image-bubble {
  display: block;
  width: 72%;
  max-width: 240px;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  background: transparent;
  border: 0;
}

.image-bubble img {
  display: block;
  width: 100%;
  height: auto;
}

.msg-row.is-sticker {
  padding-left: 35px;
  margin: 2px 0 7px;
}

.msg-row.is-sticker img {
  display: block;
  width: 92px;
  height: auto;
}

.msg-row.is-sticker + .msg-row.is-sticker {
  margin-top: -1px;
}

.typing {
  position: absolute;
  left: 13px;
  bottom: 68px;
  z-index: 16;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 10px 7px 9px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(36, 50, 65, 0.1);
}

.typing[hidden] {
  display: none !important;
}

.typing-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #7a8794;
  animation: typing-bounce 1.05s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.12s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.24s;
}

.typing-text {
  margin-left: 3px;
  font-size: 9.5px;
  color: #73808d;
}

@keyframes typing-bounce {
  0%,
  70%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  35% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.composer {
  position: relative;
  z-index: 20;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: #f4f4f4;
}

.composer-plus,
.composer-send {
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #dedede;
  background: #fff;
}

.composer-plus svg {
  width: 18px;
  height: 18px;
  color: #5b5b5b;
}

.composer-send {
  border: 0;
  background: var(--kakao-yellow);
}

.composer-send svg {
  width: 18px;
  height: 18px;
  color: #2a2616;
}

.composer-send:disabled {
  opacity: 0.5;
}

#chatInput {
  flex: 1 1 auto;
  min-width: 0;
  height: 35px;
  padding: 0 12px;
  border: 1px solid #dedede;
  border-radius: 18px;
  background: #fff;
  font-size: 13.5px;
  outline: none;
}

#chatInput:focus {
  border-color: #bfc8d2;
}

/* ---------- iPhone keyboard (desktop simulation) ---------- */

.ios-keyboard {
  --keyboard-h: 334px;
  display: none;
  flex: 0 0 var(--keyboard-h);
  height: var(--keyboard-h);
  padding: 4px 5px 0;
  flex-direction: column;
  background: #d1d4dc;
  border-top: 1px solid rgba(0, 0, 0, 0.14);
  z-index: 28;
  user-select: none;
}

.view-chat.keyboard-open .ios-keyboard {
  display: flex;
}

.keyboard-candidates {
  flex: 0 0 37px;
  height: 37px;
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  margin-bottom: 4px;
}

.keyboard-candidates button {
  height: 36px;
  min-width: 32px;
  padding: 0 7px;
  border: 0;
  background: transparent;
  color: #111;
  font-size: 16px;
  line-height: 1;
}

.keyboard-candidates .candidate-more {
  margin-left: auto;
  width: 34px;
  min-width: 34px;
  display: grid;
  place-items: center;
}

.keyboard-candidates .candidate-more svg {
  width: 20px;
  height: 20px;
  color: #555b64;
}

.keyboard-quick {
  flex: 0 0 33px;
  height: 33px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 1px 4px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  overflow-x: auto;
  scrollbar-width: none;
}

.keyboard-quick::-webkit-scrollbar {
  display: none;
}

.keyboard-quick button {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.78);
  color: #222;
  font-size: 12px;
}

.keyboard-layer[hidden] {
  display: none !important;
}

.keyboard-layer {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.keyboard-row {
  display: flex;
  align-items: stretch;
  gap: 4px;
  height: 40px;
  margin-bottom: 6px;
  padding: 0 1px;
}

.keyboard-row-middle {
  padding: 0 20px;
}

.keyboard-row-bottom {
  height: 42px;
  margin-bottom: 0;
  padding: 0;
}

.key {
  flex: 1 1 0;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: #fff;
  color: #101010;
  font-size: 17px;
  line-height: 1;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.34);
}

.key:active {
  background: #e5e7eb;
}

.key-special {
  background: #adb3bd;
  font-size: 14px;
}

.key-special:active {
  background: #9ea5b0;
}

.key-shift,
.key-delete {
  flex: 0 0 42px;
  display: grid;
  place-items: center;
}

.key-shift svg,
.key-delete svg {
  width: 22px;
  height: 22px;
}

.key-shift.is-on {
  background: #fff;
}

.key-123 {
  flex: 0 0 50px;
}

.key-emoji {
  flex: 0 0 42px;
  display: grid;
  place-items: center;
}

.key-emoji svg {
  width: 21px;
  height: 21px;
}

.key-abc {
  flex: 0 0 50px;
}

.key-more-symbols {
  flex: 0 0 48px;
}

.key-space {
  flex: 1 1 auto;
  font-size: 14px;
}

.key-send {
  flex: 0 0 68px;
  background: #007aff;
  color: #fff;
  font-size: 14px;
  font-weight: 650;
}

.key-send:active {
  background: #0068d9;
}

.ios-keyboard.is-shifted .key[data-letter] {
  text-transform: uppercase;
}

.keyboard-meta {
  flex: 0 0 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.keyboard-meta button {
  width: 30px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #4d535c;
}

.keyboard-meta svg {
  width: 22px;
  height: 22px;
}

.keyboard-home {
  display: block;
  flex: 0 0 7px;
  width: 124px;
  height: 4px;
  margin: 0 auto 3px;
  border-radius: 3px;
  background: #111;
}

.view-chat.keyboard-open .composer {
  padding-bottom: 7px;
}

.view-chat.keyboard-open .composer-send {
  visibility: hidden;
}

.view-chat.keyboard-open .home-indicator {
  display: none;
}

.view-chat.keyboard-open .typing {
  bottom: calc(var(--keyboard-h, 334px) + 62px);
}

/* ---------- Gesture buttons ---------- */

.edge-back {
  position: absolute;
  left: 0;
  top: 56px;
  bottom: 66px;
  z-index: 25;
  width: 24px;
  border: 0;
  padding: 0;
  background: transparent;
  opacity: 0;
}

.edge-back:focus-visible {
  opacity: 1;
  outline: 2px solid rgba(0, 0, 0, 0.65);
  outline-offset: -4px;
  background: rgba(255, 255, 255, 0.18);
}

.home-indicator {
  position: absolute;
  left: 50%;
  bottom: 6px;
  z-index: 30;
  width: 140px;
  height: 24px;
  padding: 0;
  transform: translateX(-50%);
  border: 0;
  background: transparent;
  touch-action: none;
}

.home-indicator::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 124px;
  height: 5px;
  transform: translateX(-50%);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.88);
}

.home-indicator:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.7);
  outline-offset: 1px;
  border-radius: 8px;
}

/* ---------- Call ---------- */

.view-call {
  background: #17120e;
}

.call-hit {
  position: absolute;
  z-index: 10;
  top: 82.5%;
  width: 26%;
  height: 12%;
  border: 0;
  background: transparent;
  border-radius: 40px;
}

.call-decline {
  left: 7.5%;
}

.call-accept {
  right: 7.5%;
}

.call-hit:active {
  background: rgba(255, 255, 255, 0.09);
}

.call-hit:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: -8px;
}

.active-call {
  position: absolute;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  background: #1a1410;
  color: #fff;
}

.active-call[hidden] {
  display: none !important;
}

.call-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #1a1410;
}

.call-video[hidden] {
  display: none !important;
}

.active-call-dim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(16, 12, 9, 0.58);
}

.active-call-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 64px 24px 46px;
  text-align: center;
}

.live-top {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.live-badge {
  display: inline-block;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.78);
  font-size: 9.5px;
  line-height: 1.35;
}

.live-name {
  margin-top: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.05em;
}

.live-heart {
  width: 27px;
  height: 27px;
  margin-top: 4px;
}

.live-status {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.64);
}

.call-wave {
  position: absolute;
  left: 50%;
  top: 56%;
  height: 42px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 6px;
}

.call-wave i {
  display: block;
  width: 4px;
  height: 11px;
  border-radius: 3px;
  background: #d8c6b2;
  animation: call-wave 1.05s ease-in-out infinite;
}

.call-wave i:nth-child(2) {
  animation-delay: 0.1s;
}

.call-wave i:nth-child(3) {
  animation-delay: 0.2s;
}

.call-wave i:nth-child(4) {
  animation-delay: 0.3s;
}

.call-wave i:nth-child(5) {
  animation-delay: 0.4s;
}

.call-wave i:nth-child(6) {
  animation-delay: 0.5s;
}

.call-wave i:nth-child(7) {
  animation-delay: 0.6s;
}

@keyframes call-wave {
  0%,
  100% {
    transform: scaleY(0.65);
    opacity: 0.55;
  }
  50% {
    transform: scaleY(2.3);
    opacity: 1;
  }
}

.call-timer {
  position: absolute;
  left: 0;
  right: 0;
  top: 63%;
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 15px;
  letter-spacing: 0.12em;
}

.end-call {
  position: absolute;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 11.5px;
}

.end-call-disc {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #df4a41;
}

.end-call-disc svg {
  width: 31px;
  height: 31px;
  color: #fff;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 46px 20px 28px;
  background: rgba(0, 0, 0, 0.95);
  color: #fff;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox img {
  display: block;
  width: 100%;
  height: 74%;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-caption {
  margin: 14px 0 0;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 17px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: transparent;
  color: #fff;
}

.lightbox-close svg {
  width: 18px;
  height: 18px;
}

/* ---------- Toast ---------- */

.toast {
  position: absolute;
  left: 50%;
  top: calc(58px + env(safe-area-inset-top));
  bottom: auto;
  z-index: 80;
  max-width: 82%;
  padding: 9px 14px;
  transform: translate(-50%, -8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(14, 14, 14, 0.84);
  color: #fff;
  font-size: 11.5px;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

body[data-scene="chat"] .toast {
  top: calc(104px + env(safe-area-inset-top));
}

/* ---------- Missed-call notice ---------- */

.call-notice {
  position: absolute;
  left: 50%;
  top: calc(56px + env(safe-area-inset-top));
  z-index: 95;
  width: calc(100% - 28px);
  max-width: 360px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  transform: translate(-50%, -10px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 17px;
  background: rgba(250, 250, 250, 0.97);
  color: #111;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.call-notice[hidden] {
  display: none !important;
}

.call-notice.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.call-notice-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ff3b30;
  color: #fff;
}

.call-notice-icon svg {
  width: 19px;
  height: 19px;
}

.call-notice-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.call-notice-copy b {
  font-size: 12.5px;
  line-height: 1.2;
  font-weight: 700;
}

.call-notice-copy span {
  font-size: 10.5px;
  line-height: 1.2;
  color: #6b6b70;
}

.call-notice-time {
  margin-left: auto;
  align-self: flex-start;
  padding-top: 2px;
  color: #9a9a9f;
  font-size: 9px;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .page {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 20px;
  }

  .intro {
    display: none;
  }

  .device-stage {
    width: 100%;
  }
}

@media (max-width: 640px) {
  body {
    background: #000;
  }

  .page {
    display: block;
    width: 100%;
    height: var(--vvh, 100dvh);
    min-height: 0;
    padding: 0;
  }

  .device-stage {
    width: 100%;
    height: var(--vvh, 100dvh);
  }

  .device {
    width: 100vw;
    height: var(--vvh, 100dvh);
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .screen {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 0;
  }

  .side-btn,
  .power-btn,
  .scene-label,
  .dynamic-island {
    display: none;
  }

  .statusbar {
    flex-basis: calc(44px + env(safe-area-inset-top));
    height: calc(44px + env(safe-area-inset-top));
    padding-top: max(10px, env(safe-area-inset-top));
  }

  .chat-header .statusbar {
    flex-basis: calc(44px + env(safe-area-inset-top));
    height: calc(44px + env(safe-area-inset-top));
  }

  .unlock-tray {
    height: calc(108px + env(safe-area-inset-bottom));
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .ig-tabbar {
    height: calc(65px + env(safe-area-inset-bottom));
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }

  .composer {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .home-indicator {
    bottom: calc(6px + env(safe-area-inset-bottom));
  }

  .typing {
    bottom: calc(68px + env(safe-area-inset-bottom));
  }

  .toast {
    top: calc(58px + env(safe-area-inset-top));
    bottom: auto;
  }

  .end-call {
    bottom: calc(48px + env(safe-area-inset-bottom));
  }
}

@media (max-height: 640px) and (min-width: 641px) {
  .device {
    width: min(330px, calc((100dvh - 90px) * 0.492));
  }

  .scene-label {
    margin-top: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
