:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  --phone-width: 390px;
  --phone-height: 844px;
}

/* ============================= */
/* RESET */
/* ============================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #111;
  color: #fff;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "SF Pro Text",
    "Apple SD Gothic Neo",
    "Noto Sans KR",
    sans-serif;
}

button {
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

/* ============================= */
/* WEB BACKGROUND */
/* ============================= */

.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.38)),
    url("assets/wallpaper/background.jpg") center / cover no-repeat;
  transform: scale(1.00);
  filter: blur(1px);
  pointer-events: none;
}


/* =========================
   ENTRY FLOW
========================= */
.entry-flow {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #e5e5e5;
  overflow: hidden;
}

.entry-flow:not(.active) {
  display: none;
}

.entry-screen {
  position: absolute;
  inset: 0;
  display: block;
  background: #e5e5e5;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.01);
  transition:
    opacity 0.28s ease,
    transform 0.32s ease,
    visibility 0.32s ease;
}

.entry-screen.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1);
}

.entry-picture {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.entry-picture img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.entry-hitbox {
  position: absolute;
  z-index: 2;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

.entry-hitbox::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.18);
  opacity: 0;
  transform: scale(0.96);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
  pointer-events: none;
}

.entry-hitbox:active::after {
  opacity: 1;
  transform: scale(1);
}

.entry-hitbox:active {
  transform: scale(0.98);
}

/* shake */
.entry-screen.shake {
  animation: entryImageShake 0.36s ease;
}

@keyframes entryImageShake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(10px); }
  60% { transform: translateX(-8px); }
  80% { transform: translateX(8px); }
  100% { transform: translateX(0); }
}

/* =========================
   ENTRY GATE PASSCODE
========================= */
.entry-gate-passcode-screen {
  position: absolute;
  inset: 0;
  background: #e5e5e5;

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

.entry-gate-bg {
  position: absolute;
  inset: 0;
  background: #e5e5e5;
}

.entry-gate-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 390px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 118px;
  left: 0;
}

.entry-gate-wrap.shake {
  animation: iphoneShakeLeft 0.36s ease;
}

.entry-gate-lock {
  width: 24px;
  height: 28px;
  position: relative;
  margin-bottom: 32px;
}

.entry-gate-lock::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 12px;
  height: 9px;
  border: 3px solid #222;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
}

.entry-gate-lock::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  width: 20px;
  height: 15px;
  border-radius: 4px;
  background: #222;
}

.entry-gate-title {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 22px;
  color: rgba(35, 35, 35, 0.95);
}

.entry-gate-dots {
  display: flex;
  gap: 26px;
  margin-bottom: 56px;
}

.entry-gate-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(55, 55, 55, 0.55);
  background: transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.entry-gate-dot.filled {
  background: rgba(35, 35, 35, 0.9);
  border-color: rgba(35, 35, 35, 0.9);
}

.entry-gate-keypad {
  display: grid;
  grid-template-columns: repeat(3, 94px);
  gap: 18px 14px;
  justify-content: center;
  align-items: center;
}

.entry-gate-key {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(70, 70, 70, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #222;
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
  will-change: transform, background;
}

.entry-gate-key::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.20) 0%,
      rgba(255,255,255,0.08) 26%,
      rgba(255,255,255,0.02) 48%,
      rgba(255,255,255,0.00) 72%
    );
  pointer-events: none;
}

.entry-gate-key::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.12) 35%, rgba(255,255,255,0.00) 72%);
  opacity: 0;
  transform: scale(0.45);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  pointer-events: none;
}

.entry-gate-key:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.58);
}

.entry-gate-key.tap {
  transform: scale(0.955);
  background: rgba(255, 255, 255, 0.54);
}

.entry-gate-key.tap::after {
  opacity: 1;
  transform: scale(1);
}

.entry-gate-key .num {
  font-size: 34px;
  line-height: 1;
  font-weight: 300;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
  color: #222;
}

.entry-gate-key .letters {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1;
  margin-left: 2px;
  position: relative;
  z-index: 1;
  color: rgba(34, 34, 34, 0.72);
}

.entry-gate-key-empty {
  width: 94px;
  height: 94px;
}

/* =========================
   DESKTOP HOTSPOT
========================= */
.intro-later {
  left: 38.4%;
  top: 55.0%;
  width: 9.2%;
  height: 6.4%;
  border-radius: 999px;
}

.intro-confirm {
  left: 49.4%;
  top: 55.0%;
  width: 10.8%;
  height: 6.4%;
  border-radius: 999px;
}

.notice-confirm {
  left: 44.0%;
  top: 82%;
  width: 12.1%;
  height: 5.4%;
  border-radius: 999px;
}

.select-gw {
  left: 44.0%;
  top: 54.2%;
  width: 12.0%;
  height: 5.4%;
  border-radius: 999px;
}

.select-xl {
  left: 44.0%;
  top: 62.5%;
  width: 12.0%;
  height: 5.4%;
  border-radius: 999px;
}

/* =========================
   MOBILE ONLY
========================= */
@media screen and (max-width: 480px) {
  .entry-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .intro-later {
    left: 21.2%;
    top: 57.2%;
    width: 27.8%;
    height: 5.6%;
  }

  .intro-confirm {
    left: 51.3%;
    top: 57.2%;
    width: 27.8%;
    height: 5.6%;
  }

  .notice-confirm {
    left: 14.8%;
    top: 76.9%;
    width: 70.4%;
    height: 5.4%;
  }

  .select-gw {
    left: 14.9%;
    top: 53.9%;
    width: 70.2%;
    height: 5.2%;
  }

  .select-xl {
    left: 14.9%;
    top: 61.0%;
    width: 70.2%;
    height: 5.2%;
  }

  .entry-gate-passcode-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
  }

  .entry-gate-wrap {
    width: 100%;
    max-width: 360px;
    min-height: auto;
    padding-top: 0;
    margin: 0 auto;
    justify-content: center;
  }

  .entry-gate-lock {
    margin-bottom: 28px;
  }

  .entry-gate-title {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .entry-gate-dots {
    margin-bottom: 42px;
  }

  .entry-gate-keypad {
    grid-template-columns: repeat(3, 82px);
    gap: 14px 12px;
  }

  .entry-gate-key,
  .entry-gate-key-empty {
    width: 82px;
    height: 82px;
  }

  .entry-gate-key .num {
    font-size: 31px;
  }

  .entry-gate-key .letters {
    font-size: 8px;
  }
}

/* ============================= */
/* PHONE FRAME */
/* ============================= */

.phone {
  position: relative;
  z-index: 1;
  width: var(--phone-width);
  height: var(--phone-height);
  border-radius: 42px;
  overflow: hidden;
  background: #000;
  box-shadow:
    0 0 0 10px #0c0c0d,
    0 28px 80px rgba(0, 0, 0, 0.55);
}

/* ============================= */
/* DYNAMIC ISLAND */
/* ============================= */

.dynamic-island {
  position: absolute;
  top: calc(10px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  width: 126px;
  height: 34px;
  border-radius: 20px;
  background: #000;
  z-index: 50;
}

/* ============================= */
/* STATUS BAR */
/* ============================= */

.statusbar {
  position: absolute;
  top: calc(13px + var(--safe-top));
  left: 0;
  width: 100%;
  padding-left: calc(28px + var(--safe-left));
  padding-right: calc(26px + var(--safe-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 60;
  pointer-events: none;
}

.status-left {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.4px;
  line-height: 1;
  color: #fff;
}

.status-right {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* cellular */
.cellular {
  display: flex;
  align-items: end;
  gap: 3px;
  height: 13px;
}

.cellular i {
  display: block;
  width: 4px;
  background: #fff;
  border-radius: 2px;
}

.cellular i:nth-child(1) { height: 5px; opacity: 0.95; }
.cellular i:nth-child(2) { height: 8px; opacity: 0.95; }
.cellular i:nth-child(3) { height: 11px; opacity: 0.95; }
.cellular i:nth-child(4) { height: 13px; opacity: 0.95; }

/* wifi */
.wifi {
  position: relative;
  width: 17px;
  height: 12px;
  overflow: visible;
}

.wifi::before,
.wifi::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 2px solid transparent;
  border-top-color: #fff;
  border-radius: 50%;
}

.wifi::before {
  top: -1px;
  width: 16px;
  height: 16px;
}

.wifi::after {
  top: 3px;
  width: 8px;
  height: 8px;
}

.wifi-dot {
  position: absolute;
  left: 50%;
  bottom: 1px;
  transform: translateX(-50%);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
}

/* battery */
.battery {
  position: relative;
  width: 26px;
  height: 13px;
  border: 1.8px solid #fff;
  border-radius: 4px;
  box-sizing: border-box;
}

.battery::after {
  content: "";
  position: absolute;
  top: 3.2px;
  right: -3.5px;
  width: 2px;
  height: 5px;
  border-radius: 1px;
  background: #fff;
}

.battery-level {
  position: absolute;
  top: 1.8px;
  left: 1.8px;
  width: 18px;
  height: 7px;
  border-radius: 2px;
  background: #fff;
}

/* ============================= */
/* APP SCREEN STATUSBAR OVERRIDE */
/* ============================= */

.phone:has(.app-screen.active) .status-left {
  color: #111;
}

.phone:has(.app-screen.active) .cellular i {
  background: #111;
}

.phone:has(.app-screen.active) .wifi::before,
.phone:has(.app-screen.active) .wifi::after {
  border-top-color: #111;
}

.phone:has(.app-screen.active) .wifi-dot {
  background: #111;
}

.phone:has(.app-screen.active) .battery {
  border-color: #111;
}

.phone:has(.app-screen.active) .battery::after,
.phone:has(.app-screen.active) .battery-level {
  background: #111;
}

/* ============================= */
/* COMMON SCREEN */
/* ============================= */

.screen {
  position: absolute;
  inset: 0;
  display: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(0.995);
  transition:
    opacity 0.32s ease,
    transform 0.32s ease,
    visibility 0.32s ease;
}

.screen.active,
.screen.opening,
.screen.closing {
  display: block;
}

.screen.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.lock-screen {
  z-index: 5;
}

.passcode-screen {
  z-index: 6;
}

.home-screen {
  z-index: 7;
}

.app-screen {
  z-index: 20;
}

.screen.opening {
  animation: screenOpen 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.screen.closing {
  animation: screenClose 0.22s ease forwards;
}

@keyframes screenOpen {
  0% {
    opacity: 0;
    transform: scale(1.02);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes screenClose {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.995);
  }
}

.wallpaper {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.wallpaper-lock {
  background: url("assets/wallpaper/wallpaper_lock.jpg") center / cover no-repeat;
}

.wallpaper-passcode {
  background:
    linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18)),
    url("assets/wallpaper/wallpaper_lock.jpg") center / cover no-repeat;
}

.wallpaper-home {
  background:
    linear-gradient(rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0.10)),
    url("assets/wallpaper/wallpaper_lock.jpg") center / cover no-repeat;
  filter: blur(8px);
  transform: scale(1.08);
}

.lock-overlay-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(148px + var(--safe-top));
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.42), transparent);
  z-index: 1;
  pointer-events: none;
}

/* ============================= */
/* LOCK SCREEN */
/* ============================= */

.lock-screen {
  z-index: 5;
  cursor: pointer;
  touch-action: manipulation;
}

.lock-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: calc(110px + var(--safe-top));
  pointer-events: none;
}

.lock-icon {
  width: 20px;
  height: 24px;
  position: relative;
  margin-bottom: 24px;
}

.lock-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 12px;
  height: 10px;
  border: 3px solid #fff;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
}

.lock-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 18px;
  height: 14px;
  border-radius: 4px;
  background: #fff;
}

.lock-date {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 2px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.25);
}

.lock-time {
  font-size: 96px;
  line-height: 0.95;
  font-weight: 200;
  letter-spacing: -4px;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.22);
}

.swipe-up-area {
  position: absolute;
  left: 50%;
  bottom: calc(26px + var(--safe-bottom));
  transform: translateX(-50%);
  width: 240px;
  height: 24px;
  z-index: 4;
  pointer-events: none;
}

.swipe-up-text {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.24);
}

.lock-bottom-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(86px + var(--safe-bottom));
  z-index: 3;
  display: flex;
  justify-content: space-between;
  padding-left: calc(28px + var(--safe-left));
  padding-right: calc(28px + var(--safe-right));
  pointer-events: none;
}

.round-action {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
}

.lock-btn-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.home-indicator {
  position: absolute;
  left: 50%;
  bottom: calc(8px + var(--safe-bottom));
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  z-index: 4;
  pointer-events: none;
}

/* ============================= */
/* PASSCODE SCREEN */
/* ============================= */

.passcode-screen {
  z-index: 6;
}

.passcode-blur {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.22);
  z-index: 1;
  pointer-events: none;
}

.passcode-wrap {
  position: relative;
  left: 0;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: calc(112px + var(--safe-top));
}

.passcode-lock {
  margin-bottom: 34px;
}

.passcode-title {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 22px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.22);
}

.passcode-dots {
  display: flex;
  gap: 26px;
  margin-bottom: 62px;
}

.passcode-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.95);
  background: transparent;
  transition: background 0.15s ease;
}

.passcode-dot.filled {
  background: rgba(255, 255, 255, 0.95);
}

.passcode-wrap.shake {
  animation: iphoneShakeLeft 0.36s ease;
}

@keyframes iphoneShakeLeft {
  0% { left: 0; }
  20% { left: -10px; }
  40% { left: 10px; }
  60% { left: -8px; }
  80% { left: 8px; }
  100% { left: 0; }
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 94px);
  gap: 18px 14px;
  justify-content: center;
  align-items: center;
}

.key {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    inset 0 -1px 0 rgba(255,255,255,0.06),
    0 6px 14px rgba(0,0,0,0.12);
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
  will-change: transform, background;
}

.key::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.28) 0%,
      rgba(255,255,255,0.12) 20%,
      rgba(255,255,255,0.04) 40%,
      rgba(255,255,255,0.00) 70%
    );
  pointer-events: none;
}

.key::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.10) 35%, rgba(255,255,255,0.00) 72%);
  opacity: 0;
  transform: scale(0.45);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  pointer-events: none;
}

.key:active {
  transform: scale(0.96);
  background: rgba(255,255,255,0.16);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.30),
    inset 0 -1px 0 rgba(255,255,255,0.10),
    0 4px 10px rgba(0,0,0,0.14);
}

.key.tap {
  transform: scale(0.955);
  background: rgba(255, 255, 255, 0.12);
}

.key.tap::after {
  opacity: 1;
  transform: scale(1);
}

.key .num {
  font-size: 34px;
  line-height: 1;
  font-weight: 300;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.key .letters {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1;
  opacity: 0.95;
  margin-left: 2px;
  position: relative;
  z-index: 1;
}

.key-empty {
  width: 94px;
  height: 94px;
}

/* ============================= */
/* HOME SCREEN */
/* ============================= */

.home-screen {
  z-index: 4;
}

.home-apps {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(6, 88px);
  column-gap: 8px;
  row-gap: 18px;
  width: 100%;
  height: calc(100% - 128px);
  padding: calc(96px + var(--safe-top)) 16px 0 16px;
}

.app-icon,
.app-empty {
  width: 100%;
  min-width: 0;
  height: 88px;
}

.app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  color: #fff;
}

.app-icon img {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  object-fit: cover;
}

.app-icon span {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}

.app-empty {
  visibility: hidden;
}

/* ============================= */
/* LIVE CALENDAR ICON */
/* ============================= */

.calendar-app-icon .calendar-icon-wrap {
  position: relative;
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
}

.calendar-app-icon .calendar-icon-wrap img {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  object-fit: cover;
  display: block;
}

.calendar-app-icon .calendar-live-weekday {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  text-align: center;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.2px;
  white-space: nowrap;
  z-index: 2;
  pointer-events: none;
  color: #111;
}

.calendar-app-icon .calendar-live-weekday.is-holiday {
  color: #ff3b30;
}

.calendar-app-icon .calendar-live-date {
  position: absolute;
  top: 17px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  text-align: center;
  font-size: 28px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -1.2px;
  z-index: 2;
  pointer-events: none;
  color: #111;
}

/* ============================= */
/* DOCK */
/* ============================= */

.dock {
  position: absolute;
  left: 50%;
  bottom: calc(16px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 3;
  width: calc(100% - 22px);
  max-width: 368px;
  height: 92px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  justify-items: center;
  padding: 0 8px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -1px 0 rgba(255,255,255,0.04),
    0 12px 28px rgba(0,0,0,0.14);
  overflow: hidden;
}

.dock::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.22) 0%,
      rgba(255,255,255,0.08) 20%,
      rgba(255,255,255,0.02) 45%,
      rgba(255,255,255,0.00) 72%
    );
  pointer-events: none;
}

.dock-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dock-icon img {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  object-fit: cover;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -1px 0 rgba(255,255,255,0.03);
}

.home-screen .home-indicator {
  display: none !important;
}

/* ============================= */
/* APP TOUCH / OPEN EFFECT */
/* ============================= */

.app-icon img,
.dock-icon img {
  transition:
    transform 0.18s ease,
    filter 0.18s ease,
    opacity 0.18s ease;
  will-change: transform, filter, opacity;
}

.app-icon.touching img,
.dock-icon.touching img {
  transform: scale(0.88);
  filter: brightness(0.92);
}

.app-icon.launching img,
.dock-icon.launching img {
  animation: appIconLaunch 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes appIconLaunch {
  0% {
    transform: scale(1);
    opacity: 1;
    filter: brightness(1);
  }
  35% {
    transform: scale(0.90);
    opacity: 1;
    filter: brightness(1.06);
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
    filter: brightness(1.12);
  }
}

.home-screen.app-opening {
  animation: homeScreenFade 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes homeScreenFade {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0px);
  }
  100% {
    opacity: 0;
    transform: scale(1.03);
    filter: blur(6px);
  }
}

/* ============================= */
/* APP SCREEN BASIC */
/* ============================= */

.app-screen {
  background: #fff;
  color: #000;
  z-index: 20;
}

.app-ui {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.app-header {
  position: relative;
  height: calc(92px + var(--safe-top));
  padding-top: calc(18px + var(--safe-top));
  padding-left: 16px;
  padding-right: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  border-bottom: 1px solid #eee;
  background: #fff;
}

.app-back-btn {
  position: absolute;
  top: calc(48px + var(--safe-top));
  left: 16px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(240, 240, 240, 0.72);
  border: 1px solid rgba(255,255,255,0.5);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.5),
    0 4px 12px rgba(0,0,0,0.08);
  z-index: 3;
}

.back-arrow {
  display: block;
  width: 11px;
  height: 11px;
  border-left: 2.6px solid #111;
  border-bottom: 2.6px solid #111;
  transform: rotate(45deg);
  margin-left: 3px;
}

.app-back-btn:active {
  transform: scale(0.96);
  background: rgba(232, 232, 232, 0.82);
}

.app-content {
  flex: 1;
  overflow-y: auto;
}

/* ============================= */
/* IOS TOP NOTIFICATION POPUP */
/* ============================= */

.notif-popup {
  position: absolute;
  top: calc(14px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%) translateY(-18px);
  width: calc(100% - 18px);
  max-width: 372px;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -1px 0 rgba(255,255,255,0.04),
    0 12px 28px rgba(0,0,0,0.14);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.26s ease,
    transform 0.26s ease,
    visibility 0.26s ease;
  overflow: hidden;
}

.notif-popup::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.22) 0%,
      rgba(255,255,255,0.08) 20%,
      rgba(255,255,255,0.02) 45%,
      rgba(255,255,255,0.00) 72%
    );
  pointer-events: none;
}

.notif-popup.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.notif-left {
  position: relative;
  z-index: 1;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
}

.notif-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}

.notif-center {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

.notif-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.notif-app {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-time {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.72);
  white-space: nowrap;
  flex-shrink: 0;
}

.notif-text {
  font-size: 13px;
  line-height: 1.3;
  color: rgba(255,255,255,0.94);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================= */
/* MEMO APP */
/* ============================= */

.memo-screen {
  background: #f2f2f7;
  color: #4a4a4a;
}

.memo-ui {
  position: relative;
  height: 100%;
  background: #f2f2f7;
  overflow: hidden;
}

.memo-page {
  position: absolute;
  inset: 0;
  background: #f2f2f7;
  transition:
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease;
}

.memo-list-page {
  transform: translateX(0);
  opacity: 1;
  z-index: 1;
}

.memo-detail-page {
  transform: translateX(100%);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
}

.memo-screen.detail-open .memo-list-page {
  transform: translateX(-18%);
  opacity: 0;
}

.memo-screen.detail-open .memo-detail-page {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.memo-topbar {
  position: relative;
  height: calc(118px + var(--safe-top));
  flex-shrink: 0;
}

.memo-home-back,
.memo-detail-back {
  top: calc(54px + var(--safe-top));
  left: 14px;
}

.memo-more-btn {
  position: absolute;
  top: calc(54px + var(--safe-top));
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.55);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.5),
    0 4px 12px rgba(0,0,0,0.08);
}

.memo-more-dots {
  position: relative;
  display: block;
  width: 16px;
  height: 4px;
  background:
    radial-gradient(circle, #111 0 1.7px, transparent 1.8px) center / 6px 4px repeat-x;
}

.memo-list-scroll,
.memo-detail-scroll {
  height: calc(100% - (118px + var(--safe-top)));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.memo-list-scroll {
  padding: 10px 20px 40px;
}

.memo-list-head {
  margin-top: 10px;
  margin-bottom: 34px;
}

.memo-list-head h1 {
  font-size: 36px;
  line-height: 1;
  font-weight: 800;
  color: #3e3e42;
  letter-spacing: -1.2px;
  margin-bottom: 6px;
}

.memo-list-head p {
  font-size: 15px;
  color: #6a6a6f;
}

.memo-section-block {
  margin-bottom: 28px;
}

.memo-section-title {
  font-size: 22px;
  line-height: 1.1;
  font-weight: 700;
  color: #3f3f43;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.memo-card {
  background: #fafafa;
  border-radius: 22px;
  overflow: hidden;
}

.memo-list-item {
  width: 100%;
  display: block;
  text-align: left;
  padding: 16px 18px 14px;
  background: transparent;
  color: inherit;
}

.memo-list-item + .memo-list-item {
  border-top: 1px solid rgba(60,60,67,0.14);
}

.memo-item-title {
  font-size: 17px;
  line-height: 1.2;
  font-weight: 700;
  color: #222;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.memo-item-meta {
  font-size: 14px;
  color: #9a9aa0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.memo-list-item:active {
  background: rgba(0,0,0,0.03);
}

/* detail */
.memo-detail-topbar {
  position: relative;
}

.memo-detail-actions {
  position: absolute;
  top: calc(54px + var(--safe-top));
  right: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 3;
}

.memo-image-btn {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.memo-circle-btn {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
}

.memo-pill-btn {
  width: 88px;
  height: 46px;
  flex: 0 0 88px;
}

.memo-action-image {
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.memo-action-image-undo {
  width: 46px;
  height: 46px;
}

.memo-action-image-share {
  width: 88px;
  height: 46px;
}

.memo-detail-scroll {
  padding: 18px 22px 42px;
}

.memo-detail-date {
  text-align: center;
  font-size: 16px;
  color: #8a8a8f;
  margin-bottom: 26px;
  letter-spacing: -0.3px;
}

.memo-detail-title {
  font-size: 34px;
  line-height: 1.08;
  font-weight: 800;
  color: #4a4a4e;
  letter-spacing: -1.2px;
  margin-bottom: 40px;
}

.memo-detail-body {
  color: #55575c;
  font-size: 17px;
  line-height: 1.72;
  white-space: normal;
  word-break: break-all;
}

.memo-detail-body p {
  margin-bottom: 28px;
}

.memo-detail-body a {
  color: #d7a326;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.memo-checklist {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.memo-check-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.memo-check-circle {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin-top: 2px;
  position: relative;
}

.memo-check-item.checked .memo-check-circle {
  background: #ddb235;
}

.memo-check-item.unchecked .memo-check-circle {
  border: 2px solid #c8c8cc;
  background: transparent;
}

.memo-check-item.checked .memo-check-circle::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  width: 9px;
  height: 5px;
  border-left: 2.4px solid #fff;
  border-bottom: 2.4px solid #fff;
  transform: rotate(-45deg);
}

.memo-check-text {
  flex: 1;
  font-size: 17px;
  line-height: 1.55;
  color: #55575c;
}

.memo-text-block {
  font-size: 17px;
  line-height: 1.72;
  color: #55575c;
}

.memo-text-block strong {
  font-weight: 800;
  color: #3f3f43;
}

.memo-detail-back:active,
.memo-image-btn:active,
.memo-circle-btn:active,
.memo-pill-btn:active,
.memo-more-btn:active {
  transform: scale(0.96);
}

/* ============================= */
/* DESKTOP ONLY */
/* ============================= */

@media (hover: hover) and (pointer: fine) {
  .app-icon:active img,
  .dock-icon:active img {
    transform: scale(0.90);
    filter: brightness(0.94);
  }
}

@media screen and (min-width: 481px) {
  .passcode-wrap {
    padding-top: calc(112px + var(--safe-top)) !important;
    transform: none !important;
  }

  .keypad {
    grid-template-columns: repeat(3, 94px) !important;
    gap: 18px 14px !important;
    transform: none !important;
  }

  .key,
  .key-empty {
    width: 94px !important;
    height: 94px !important;
  }

  .key .num {
    font-size: 34px !important;
  }

  .key .letters {
    font-size: 9px !important;
    letter-spacing: 2px !important;
  }
}

/* ============================= */
/* MOBILE ONLY */
/* ============================= */

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

  .page-bg {
    display: none;
  }

  .phone {
    width: 100vw;
    height: 100svh;
    border-radius: 0;
    box-shadow: none;
  }

  /* app screen statusbar */
  .phone:has(.app-screen.active) .statusbar {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .phone:has(.app-screen.active) .status-left {
    color: #111 !important;
  }

  .phone:has(.app-screen.active) .cellular i {
    background: #111 !important;
  }

  .phone:has(.app-screen.active) .wifi::before,
  .phone:has(.app-screen.active) .wifi::after {
    border-top-color: #111 !important;
  }

  .phone:has(.app-screen.active) .wifi-dot {
    background: #111 !important;
  }

  .phone:has(.app-screen.active) .battery {
    border-color: #111 !important;
  }

  .phone:has(.app-screen.active) .battery::after,
  .phone:has(.app-screen.active) .battery-level {
    background: #111 !important;
  }

  /* lock */
  .lock-content {
    padding-top: calc(70px + env(safe-area-inset-top));
  }

  .lock-date {
    margin-bottom: 6px;
  }

  .lock-time {
    font-size: clamp(72px, 18vw, 92px);
  }

  .lock-bottom-actions {
    bottom: calc(70px + env(safe-area-inset-bottom));
  }

  .swipe-up-area {
    bottom: calc(34px + env(safe-area-inset-bottom));
  }

  .wallpaper-lock {
    background-image: url("assets/wallpaper/wallpaper_lock.jpg");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    background-color: #000;
  }

  .wallpaper-passcode {
    background-image:
      linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18)),
      url("assets/wallpaper/wallpaper_lock.jpg");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    background-color: #000;
  }

  .wallpaper-home {
    background-image:
      linear-gradient(rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0.10)),
      url("assets/wallpaper/wallpaper_lock.jpg");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    background-color: #000;
    filter: blur(12px);
    transform: scale(1.08);
  }

  /* statusbar */
  .statusbar {
    top: calc(12px + env(safe-area-inset-top));
    padding-left: 28px;
    padding-right: 24px;
  }

  .status-left {
    font-size: 15px;
    letter-spacing: -0.45px;
  }

  .status-right {
    gap: 6px;
  }

  .cellular {
    height: 12px;
    gap: 2.5px;
  }

  .cellular i {
    width: 3.8px;
  }

  .cellular i:nth-child(1) { height: 4px; }
  .cellular i:nth-child(2) { height: 7px; }
  .cellular i:nth-child(3) { height: 10px; }
  .cellular i:nth-child(4) { height: 12px; }

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

  .wifi::before {
    width: 15px;
    height: 15px;
  }

  .wifi::after {
    top: 3px;
    width: 8px;
    height: 8px;
  }

  .battery {
    width: 25px;
    height: 12px;
  }

  .battery-level {
    width: 17px;
    height: 6px;
  }

  /* passcode */
  .passcode-screen {
    overflow: hidden;
  }

  .passcode-wrap {
    padding-top: calc(104px + env(safe-area-inset-top));
    transform: scale(0.94);
    transform-origin: top center;
  }

  .passcode-lock.lock-icon {
    width: 24px;
    height: 26px;
    margin-bottom: 18px;
  }

  .passcode-lock.lock-icon::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 12px;
    height: 9px;
    border: 3px solid #fff;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
  }

  .passcode-lock.lock-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 10px;
    bottom: auto;
    transform: translateX(-50%);
    width: 20px;
    height: 15px;
    border-radius: 4px;
    background: #fff;
  }

  .passcode-title {
    font-size: 24px;
    margin-bottom: 18px;
  }

  .passcode-dots {
    margin-bottom: 34px;
  }

  .keypad {
    grid-template-columns: repeat(3, min(88px, 22vw));
    gap: 14px 12px;
    transform: translateY(-6px);
  }

  .key,
  .key-empty {
    width: min(88px, 22vw);
    height: min(88px, 22vw);
  }

  .key .num {
    font-size: clamp(28px, 7vw, 32px);
  }

  .key .letters {
    font-size: 8px;
    letter-spacing: 1.6px;
  }

  .passcode-screen .home-indicator {
    bottom: calc(2px + env(safe-area-inset-bottom)) !important;
  }

  .key {
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
  }

  /* home */
  .home-screen {
    overflow: hidden;
  }

  .home-apps {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(6, 68px);
    justify-items: center;
    align-items: start;
    column-gap: 2px;
    row-gap: 14px;
    width: 100%;
    height: calc(100% - 118px);
    padding-top: calc(82px + env(safe-area-inset-top));
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 0;
  }

  .app-icon,
  .app-empty {
    width: 100%;
    height: 68px;
    min-width: 0;
  }

  .app-icon img {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
  }

  .app-icon span {
    margin-top: 4px;
    font-size: 10px;
    line-height: 1;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .calendar-app-icon .calendar-icon-wrap {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
  }

  .calendar-app-icon .calendar-icon-wrap img {
    width: 52px;
    height: 52px;
    border-radius: 14px;
  }

  .calendar-app-icon .calendar-live-weekday {
    top: 7px;
    font-size: 8px;
  }

  .calendar-app-icon .calendar-live-date {
    top: 17px;
    font-size: 26px;
    letter-spacing: -0.9px;
  }

  .calendar-app-icon > span:last-child {
    margin-top: 4px;
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
  }

  .dock {
    width: calc(100% - 18px);
    max-width: none;
    height: 82px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    border-radius: 24px;
    padding: 0 6px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    justify-items: center;
  }

  .dock-icon img {
    width: 54px;
    height: 54px;
    border-radius: 15px;
  }

  .round-action {
    width: 56px;
    height: 56px;
  }

  .lock-btn-img {
    width: 62px;
    height: 62px;
  }

  /* popup */
  .notif-popup {
    top: calc(10px + env(safe-area-inset-top));
    width: calc(100% - 14px);
    border-radius: 20px;
    padding: 11px 13px;
    gap: 10px;
    backdrop-filter: blur(26px) saturate(190%);
    -webkit-backdrop-filter: blur(26px) saturate(190%);
  }

  .notif-left {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
  }

  .notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }

  .notif-app,
  .notif-text {
    font-size: 13px;
  }

  .notif-time {
    font-size: 12px;
  }

  /* app common */
  .app-header {
    height: calc(88px + env(safe-area-inset-top));
    padding-top: calc(16px + env(safe-area-inset-top));
    padding-left: 14px;
    padding-right: 14px;
  }

  .app-back-btn {
    top: calc(48px + env(safe-area-inset-top));
    left: 14px;
    width: 44px;
    height: 44px;
  }

  .back-arrow {
    width: 10px;
    height: 10px;
    border-left-width: 2.4px;
    border-bottom-width: 2.4px;
  }

  /* memo */
  .memo-topbar {
    height: calc(112px + env(safe-area-inset-top));
  }

  .memo-home-back,
  .memo-detail-back {
    top: calc(54px + env(safe-area-inset-top));
    left: 14px;
  }

  .memo-more-btn {
    top: calc(54px + env(safe-area-inset-top));
    right: 14px;
    width: 44px;
    height: 44px;
  }

  .memo-list-scroll {
    height: calc(100% - (112px + env(safe-area-inset-top)));
    padding: 8px 20px 36px;
  }

  .memo-detail-scroll {
    height: calc(100% - (112px + env(safe-area-inset-top)));
    padding: 14px 20px 38px;
  }

  .memo-list-head h1 {
    font-size: 34px;
  }

  .memo-list-head p {
    font-size: 14px;
  }

  .memo-section-title {
    font-size: 20px;
    margin-bottom: 14px;
  }

  .memo-list-item {
    padding: 15px 16px 13px;
  }

  .memo-item-title {
    font-size: 16px;
  }

  .memo-item-meta {
    font-size: 13px;
  }

  .memo-detail-actions {
    top: calc(54px + env(safe-area-inset-top));
    right: 14px;
    gap: 10px;
  }

  .memo-circle-btn {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  .memo-pill-btn {
    width: 84px;
    height: 44px;
    flex: 0 0 84px;
  }

  .memo-action-image-undo {
    width: 44px;
    height: 44px;
  }

  .memo-action-image-share {
    width: 84px;
    height: 44px;
  }

  .memo-detail-date {
    font-size: 15px;
    margin-bottom: 24px;
  }

  .memo-detail-title {
    font-size: 32px;
    margin-bottom: 34px;
  }

  .memo-detail-body,
  .memo-text-block,
  .memo-check-text {
    font-size: 16px;
  }

  .memo-check-item {
    gap: 16px;
  }

  .memo-check-circle {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
  }

  .memo-check-item.checked .memo-check-circle::before {
    left: 7px;
    top: 7px;
    width: 9px;
    height: 5px;
  }
}


/* ============================= */
/* MESSAGES APP */
/* ============================= */

.messages-screen {
  background: #f3f3f4;
  color: #111;
}

.messages-ui {
  position: relative;
  height: 100%;
  background: #f3f3f4;
  overflow: hidden;
}

.messages-page {
  position: absolute;
  inset: 0;
  background: #f3f3f4;
  transition:
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease;
}

.messages-list-page {
  transform: translateX(0);
  opacity: 1;
  z-index: 1;
}

.messages-detail-page {
  transform: translateX(100%);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
}

.messages-screen.detail-open .messages-list-page {
  transform: translateX(-18%);
  opacity: 0;
}

.messages-screen.detail-open .messages-detail-page {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* 목록 상단 */
.messages-list-topbar {
  position: relative;
  height: calc(118px + var(--safe-top));
  flex-shrink: 0;
  z-index: 10;
}

.messages-home-back,
.messages-detail-back {
  top: calc(54px + var(--safe-top));
  left: 14px;
}

.messages-top-circle-btn {
  position: absolute;
  top: calc(54px + var(--safe-top));
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.55);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.5),
    0 4px 12px rgba(0,0,0,0.08);
}

.messages-filter-icon {
  position: relative;
  width: 20px;
  height: 14px;
  display: block;
  background:
    linear-gradient(#111, #111) center top / 20px 2.5px no-repeat,
    linear-gradient(#111, #111) center center / 14px 2.5px no-repeat,
    linear-gradient(#111, #111) center bottom / 8px 2.5px no-repeat;
}

.messages-list-scroll {
  height: calc(100% - (118px + var(--safe-top)));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 18px 104px;
}

.messages-list-head {
  margin-top: 0px;
  margin-bottom: 16px;
}

.messages-list-head h1 {
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
  color: #111;
  letter-spacing: -1px;
  margin-top: 4px;
}

.messages-thread-list {
  display: flex;
  flex-direction: column;
}

.messages-thread-row {
  width: 100%;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto 16px;
  column-gap: 14px;
  align-items: center;
  min-height: 112px;
  text-align: left;
  color: inherit;
}

.messages-thread-row + .messages-thread-row {
  border-top: 1px solid rgba(60,60,67,0.11);
}

.messages-thread-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #bdcaea 0%, #7b89c9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}

.messages-thread-avatar-char {
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.6px;
}

.messages-thread-avatar-default .messages-thread-avatar-head {
  position: absolute;
  top: 12px;
  left: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transform: translateX(-50%);
}

.messages-thread-avatar-default .messages-thread-avatar-body {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 32px;
  height: 14px;
  border-radius: 32px 32px 12px 12px;
  background: #fff;
  transform: translateX(-50%);
}

.messages-thread-main {
  min-width: 0;
}

.messages-thread-name {
  font-size: 16px;
  line-height: 1.15;
  font-weight: 800;
  color: #111;
  letter-spacing: -0.35px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.messages-thread-preview {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 500;
  color: #98989f;
  letter-spacing: -0.2px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.messages-thread-time {
  font-size: 14px;
  line-height: 1;
  font-weight: 500;
  color: #a9a9ae;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.messages-thread-chevron {
  width: 10px;
  height: 10px;
  border-top: 2px solid #c8c8cc;
  border-right: 2px solid #c8c8cc;
  transform: rotate(45deg);
  justify-self: end;
}

/* 목록 하단 */
.messages-bottom-bar {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: calc(10px + var(--safe-bottom));
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 12;
}

.messages-toolbar-image-btn {
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.messages-toolbar-image {
  display: block;
  width: 108%;
  max-width: none;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

/* 상세 상단 */
.messages-detail-topbar {
  position: relative;
  height: calc(142px + var(--safe-top));
  flex-shrink: 0;
  z-index: 20;
}

.messages-detail-profile-wrap {
  position: absolute;
  top: calc(58px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 21;
}

.messages-detail-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #bdcaea 0%, #7b89c9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}

.messages-detail-avatar-char {
  font-size: 32px;
  line-height: 1;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.8px;
}

.messages-detail-avatar.is-default .messages-detail-avatar-char {
  display: none;
}

.messages-detail-avatar.is-default .messages-detail-avatar-head {
  position: absolute;
  top: 16px;
  left: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transform: translateX(-50%);
}

.messages-detail-avatar.is-default .messages-detail-avatar-body {
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: 34px;
  height: 15px;
  border-radius: 34px 34px 13px 13px;
  background: #fff;
  transform: translateX(-50%);
}

.messages-detail-name-pill {
  margin-top: 8px;
  min-width: 152px;
  max-width: calc(100% - 156px);
  height: 34px;
  border-radius: 17px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.55);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.5),
    0 4px 12px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
}

.messages-detail-name {
  font-size: 14px;
  font-weight: 800;
  color: #111;
  line-height: 1;
  letter-spacing: -0.25px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.messages-detail-name-chevron {
  width: 8px;
  height: 8px;
  border-top: 2px solid #b9b9bf;
  border-right: 2px solid #b9b9bf;
  transform: rotate(45deg);
  flex-shrink: 0;
}

.messages-image-top-btn {
  position: absolute;
  top: calc(54px + var(--safe-top));
  right: 14px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: block;
  overflow: hidden;
}

.messages-video-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: fill;
  pointer-events: none;
}

/* 상세 대화 */
.messages-detail-scroll {
  height: calc(100% - (142px + var(--safe-top)));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 40px 14px 106px;
  position: relative;
  z-index: 1;
}

.messages-conversation {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.messages-row {
  display: flex;
  width: 100%;
}

.messages-row:has(.image-bubble),
.messages-row:has(.voice-bubble) {
  margin-top: -40px;
  margin-bottom: -40px;
}

.messages-row.me {
  justify-content: flex-end;
}

.messages-row.you {
  justify-content: flex-start;
}

.messages-bubble {
  position: relative;
  display: inline-block;
  width: fit-content;
  max-width: 72%;
  padding: 12px 16px;
  border-radius: 22px;
  font-size: 14px;
  line-height: 1.42;
  letter-spacing: -0.2px;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-all;
}

.messages-row.you .messages-bubble {
  background: #e7e7ea;
  color: #111;
  border-bottom-left-radius: 8px;
}

.messages-row.me .messages-bubble {
  background: #4c97f5;
  color: #fff;
  border-bottom-right-radius: 8px;
}

.messages-bubble.image-bubble {
  padding: 0;
  overflow: hidden;
  background: transparent !important;
}

.messages-bubble.image-bubble img {
  display: block;
  width: 100%;
  max-width: 220px;
  border-radius: 20px;
}

.messages-bubble.voice-bubble {
  padding: 0;
  background: transparent !important;
}

.messages-bubble.voice-bubble img {
  display: block;
  width: 240px;
  max-width: none;
  height: auto;
}

.messages-meta-center {
  width: 100%;
  text-align: center;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  color: #9a9aa0;
  letter-spacing: -0.2px;
  margin: 10px 0 2px;
}

.messages-read-status {
  align-self: flex-end;
  margin-top: -2px;
  margin-right: 10px;
  font-size: 10px;
  line-height: 1;
  font-weight: 600;
  color: #9a9aa0;
  letter-spacing: -0.2px;
}

/* 입력창 */
.messages-inputbar {
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: calc(6px + var(--safe-bottom));
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 22;
}

.messages-keyboard-image-btn {
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.messages-keyboard-image {
  display: block;
  width: 160%;
  max-width: none;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

/* 공통 active */
.messages-home-back:active,
.messages-detail-back:active,
.messages-top-circle-btn:active,
.messages-image-top-btn:active,
.messages-toolbar-image-btn:active,
.messages-keyboard-image-btn:active {
  transform: scale(0.97);
}

/* 모바일 */
@media screen and (max-width: 480px) {
  .messages-list-topbar {
    height: calc(112px + env(safe-area-inset-top));
  }

  .messages-home-back,
  .messages-detail-back {
    top: calc(54px + env(safe-area-inset-top));
  }

  .messages-top-circle-btn {
    top: calc(54px + env(safe-area-inset-top));
  }

messages-image-top-btn
  .messages-list-scroll {
    height: calc(100% - (112px + env(safe-area-inset-top)));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 34px 16px 100px;
  }

  .messages-list-head h1 {
    font-size: 32px;
  }

  .messages-thread-row {
    grid-template-columns: 56px minmax(0, 1fr) auto 14px;
    column-gap: 12px;
    min-height: 102px;
  }

  .messages-thread-avatar {
    width: 48px;
    height: 48px;
  }

  .messages-thread-avatar-char {
    font-size: 25px;
  }

  .messages-thread-avatar-default .messages-thread-avatar-head {
    top: 9px;
    width: 15px;
    height: 15px;
  }

  .messages-thread-avatar-default .messages-thread-avatar-body {
    bottom: 7px;
    width: 30px;
    height: 13px;
  }

  .messages-thread-name {
    font-size: 16px;
  }

  .messages-thread-preview {
    font-size: 14px;
  }

  .messages-thread-time {
    font-size: 14px;
  }

  .messages-bottom-bar {
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    height: 82px;
  }

  .messages-toolbar-image {
    width: 110%;
    max-width: none;
  }

  .messages-detail-topbar {
    height: calc(142px + env(safe-area-inset-top));
    z-index: 20;
  }

  .messages-detail-profile-wrap {
    top: calc(58px + env(safe-area-inset-top));
    z-index: 21;
  }

  .messages-detail-avatar {
    width: 64px;
    height: 64px;
  }

  .messages-detail-avatar-char {
    font-size: 37px;
  }

  .messages-detail-avatar.is-default .messages-detail-avatar-head {
    top: 13px;
    width: 18px;
    height: 18px;
  }

  .messages-detail-avatar.is-default .messages-detail-avatar-body {
    bottom: 10px;
    width: 34px;
    height: 15px;
  }

  .messages-detail-name-pill {
    min-width: 152px;
    max-width: calc(100% - 140px);
    height: 34px;
    margin-top: 8px;
    padding: 0 15px;
  }

  .messages-detail-name {
    font-size: 14px;
  }

.messages-video-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: fill;
}
  
  .messages-detail-scroll {
    height: calc(100% - (142px + env(safe-area-inset-top)));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 30px 14px 102px;
    position: relative;
    z-index: 1;
  }

  .messages-bubble {
    max-width: 78%;
    padding: 11px 15px;
    font-size: 15px;
    border-radius: 20px;
  }

  .messages-bubble.image-bubble img {
    max-width: 200px;
  }

.messages-bubble.voice-bubble img {
  width: 250px;
  max-width: none;
  height: auto;
}

  .messages-meta-center,
  .messages-read-status {
    font-size: 13px;
  }

  .messages-inputbar {
    left: 0;
    right: 0;
    bottom: calc(4px + env(safe-area-inset-bottom));
    height: 88px;
  }

.messages-keyboard-image {
  width: 150%;
  max-width: none;
  height: auto;
}
}


/* ============================= */
/* PHONE APP */
/* ============================= */

.phone-screen {
  background: #f3f3f4;
  z-index: 20;
}

#phoneScreen:not(.active),
#phoneScreen:not(.active) * {
  pointer-events: none !important;
}

.phone-ui {
  position: relative;
  height: 100%;
  background: #f3f3f4;
  overflow: hidden;
  --phone-header-h: calc(98px + var(--safe-top));
  --phone-bottom-h: calc(108px + var(--safe-bottom));
  --phone-search-size: 86px;
  --phone-tabbar-h: 76px;
}

/* active 상태에서 statusbar 검정 */
.phone:has(#phoneScreen.active) .status-left {
  color: #111 !important;
}

.phone:has(#phoneScreen.active) .cellular i {
  background: #111 !important;
}

.phone:has(#phoneScreen.active) .wifi::before,
.phone:has(#phoneScreen.active) .wifi::after {
  border-top-color: #111 !important;
}

.phone:has(#phoneScreen.active) .wifi-dot {
  background: #111 !important;
}

.phone:has(#phoneScreen.active) .battery {
  border-color: #111 !important;
}

.phone:has(#phoneScreen.active) .battery::after,
.phone:has(#phoneScreen.active) .battery-level {
  background: #111 !important;
}

/* 페이지 */
.phone-page {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: #f3f3f4;
  transition: opacity 0.18s ease;
}

.phone-page.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* 상단 공통 */
.phone-keypad-topbar,
.phone-page-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--phone-header-h);
  z-index: 12;
  pointer-events: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.phone-back-btn,
.phone-edit-btn,
.phone-top-circle-btn {
  pointer-events: auto;
}

.phone-back-btn {
  top: calc(52px + var(--safe-top));
  left: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(248, 248, 249, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.88),
    0 8px 20px rgba(0,0,0,0.04);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

.phone-back-btn .back-arrow {
  width: 12px;
  height: 12px;
  margin-left: 4px;
  border-left-width: 2.6px;
  border-bottom-width: 2.6px;
}

.phone-page-title {
  position: absolute;
  top: calc(60px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: #111;
  pointer-events: none;
}

.phone-top-circle-btn {
  position: absolute;
  top: calc(52px + var(--safe-top));
  right: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(248, 248, 249, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.88),
    0 8px 20px rgba(0,0,0,0.04);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

.phone-plus-icon {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
  margin: 0 auto;
}

.phone-plus-icon::before,
.phone-plus-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: #111;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.phone-plus-icon::before {
  width: 3px;
  height: 100%;
}

.phone-plus-icon::after {
  width: 100%;
  height: 3px;
}

.phone-drawer-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 14px;
  margin: 0 auto;
  background:
    linear-gradient(#111, #111) center top / 22px 2.5px no-repeat,
    linear-gradient(#111, #111) center center / 15px 2.5px no-repeat,
    linear-gradient(#111, #111) center bottom / 8px 2.5px no-repeat;
}

.phone-drawer-icon::before,
.phone-drawer-icon::after {
  display: none;
  content: none;
}

/* 최근통화 편집 버튼 제거 */
.phone-edit-btn {
  display: none !important;
}

/* 키패드 */
.phone-page-keypad {
  background: #f3f3f4;
}

.phone-page-keypad .phone-keypad-topbar .phone-back-btn {
  display: flex;
}

.phone-keypad-wrap {
  position: absolute;
  top: calc(148px + var(--safe-top));
  left: 0;
  right: 0;
  bottom: var(--phone-bottom-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.phone-dial-display-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 22px;
}

.phone-dial-display {
  min-height: 52px;
  font-size: 34px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.8px;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

.phone-dial-easteregg {
  min-width: 220px;
  min-height: 40px;
  margin-top: 10px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.42);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.78),
    0 6px 16px rgba(0,0,0,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  font-weight: 500;
  color: #111;
  letter-spacing: -0.2px;
  text-align: center;
}

.phone-keypad-grid {
  width: fit-content;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 92px);
  gap: 10px 12px;
  justify-content: center;
  justify-items: center;
}

.phone-key-btn {
  position: relative;
  width: 70px;
  height: 70px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: linear-gradient(180deg, #f8f8f8 0%, #efefef 100%);
  border: 1px solid rgba(255,255,255,0.88);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.92),
    0 9px 20px rgba(0,0,0,0.025);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition:
    transform 0.14s ease,
    background 0.14s ease,
    box-shadow 0.14s ease;
}

.phone-key-btn.tap,
.phone-key-btn:active {
  transform: scale(0.965);
  background: linear-gradient(180deg, #ececef 0%, #e4e4e8 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.72),
    0 6px 14px rgba(0,0,0,0.03);
}

.phone-key-num {
  font-size: 40px;
  line-height: 0.9;
  font-weight: 300;
  letter-spacing: -1px;
  color: #111;
}

.phone-key-sub {
  margin-top: 3.5px;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 3px;
  color: #111;
  padding-left: 3px;
}

.phone-key-plus {
  letter-spacing: 0;
  padding-left: 0;
  font-size: 15px;
  font-weight: 700;
  margin-top: 2px;
}

.phone-keypad-actions {
  position: relative;
  width: fit-content;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-call-btn {
  width: 74px;
  height: 74px;
  min-width: 74px;
  min-height: 74px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: #69cf67;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.32),
    0 14px 22px rgba(94, 202, 101, 0.14);
  flex: 0 0 auto;
}

.phone-call-btn-icon {
  width: 28px;
  height: 28px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
}

.phone-clear-btn {
  position: absolute;
  left: calc(100% + 48px);
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.phone-clear-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.phone-clear-btn-shape {
  position: absolute;
  inset: 0;
  background: #d8d8da;
  clip-path: polygon(24% 0, 100% 0, 100% 100%, 24% 100%, 0 50%);
  border-radius: 6px;
}

.phone-clear-btn-x {
  position: relative;
  z-index: 1;
  font-size: 22px;
  line-height: 1;
  font-weight: 500;
  color: #111;
  margin-left: 4px;
}

/* 연락처 / 최근기록 스크롤 */
.phone-scroll-area {
  position: absolute;
  top: calc(72px + var(--safe-top));
  left: 0;
  right: 0;
  bottom: calc(74px + var(--safe-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px;
}

/* 연락처 */
.phone-contacts-scroll {
  padding-right: 36px;
}

.phone-contacts-list,
.phone-recents-list {
  padding-top: 42px;
  padding-bottom: 18px;
}

.phone-my-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 70px;
  margin-bottom: 14px;
}

.phone-my-card-text {
  font-size: 17px;
  font-weight: 500;
  color: #98989f;
  letter-spacing: -0.35px;
}

.phone-contact-group-label {
  font-size: 13px;
  font-weight: 500;
  color: #84848b;
  letter-spacing: -0.15px;
  margin: 12px 0 6px 6px;
}

.phone-contact-row {
  display: flex;
  align-items: center;
  min-height: 72px;
}

.phone-contact-main {
  flex: 1;
  min-width: 0;
  margin-left: 14px;
  border-bottom: 1px solid rgba(60, 60, 67, 0.11);
  min-height: 72px;
  display: flex;
  align-items: center;
}

.phone-contact-name {
  font-size: 16px;
  line-height: 1.15;
  color: #111;
  letter-spacing: -0.35px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-name-plain {
  font-weight: 500;
}

.phone-name-tag {
  font-weight: 800;
  margin-left: 6px;
}

.phone-name-plain.is-missed,
.phone-name-tag.is-missed {
  color: #e1524a;
}

/* 기존 바깥 count는 숨김 */
.phone-contacts-count {
  display: none !important;
}

/* 리스트 맨 아래 count (JS에서 생성) */
.phone-contacts-count-row {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 0 12px;
}

.phone-contacts-count-inline {
  font-size: 15px;
  line-height: 1;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.25px;
}

/* 연락처 인덱스는 스크롤 영역 바깥에 있어야 고정됨 */
.phone-page-contacts {
  position: absolute;
  inset: 0;
}

.phone-contacts-side-index {
  position: absolute;
  top: calc(146px + var(--safe-top));
  right: 6px;
  bottom: calc(var(--phone-bottom-h) + 4px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  z-index: 30;
  pointer-events: none;
}

.phone-contacts-side-index span {
  display: block;
  font-size: 7.5px;
  line-height: 1;
  font-weight: 700;
  color: #3f83f8;
  text-align: center;
  letter-spacing: 0;
}

/* 아바타 */
.phone-avatar {
  position: relative;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #aebee6 0%, #798ac9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}

.phone-avatar-char {
  font-size: 25px;
  line-height: 1;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.6px;
}

.phone-avatar-my {
  background: linear-gradient(135deg, #bdcaea 0%, #7b89c9 100%);
}

.phone-mycard-head {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  transform: translateX(-50%);
  opacity: 0.96;
}

.phone-mycard-body {
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 30px;
  height: 13px;
  background: #fff;
  border-radius: 30px 30px 12px 12px;
  transform: translateX(-50%);
  opacity: 0.96;
}

/* 최근통화 */
.phone-recents-scroll {
  padding-right: 16px;
}

.phone-recents-list {
  display: flex;
  flex-direction: column;
}

.phone-recents-row {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto 40px;
  align-items: center;
  column-gap: 12px;
  min-height: 82px;
}

.phone-recents-row::after {
  content: "";
  position: absolute;
  left: 60px;
  right: 40px;
  bottom: 0;
  height: 1px;
  background: rgba(60, 60, 67, 0.11);
}

.phone-recents-row:last-child::after {
  display: none;
}

.phone-recents-main {
  min-width: 0;
  border-bottom: none;
  min-height: 82px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.phone-recents-name {
  font-size: 16px;
  line-height: 1.15;
  color: #111;
  letter-spacing: -0.35px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-recents-sub {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.1;
  font-weight: 500;
  color: #9b9ba1;
  letter-spacing: -0.2px;
}

.phone-recents-date {
  align-self: center;
  min-width: 46px;
  padding: 0 2px 0 0;
  font-size: 14px;
  line-height: 1;
  font-weight: 500;
  color: #a9a9ae;
  letter-spacing: -0.2px;
  text-align: right;
}

.phone-recent-call-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ebebed;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-recent-call-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

/* 하단 */
.phone-bottom-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--phone-bottom-h);
  padding: 8px 12px calc(12px + var(--safe-bottom));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  z-index: 14;
  pointer-events: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.phone-tabbar,
.phone-search-btn {
  pointer-events: auto;
}

.phone-tabbar {
  flex: 1;
  height: var(--phone-tabbar-h);
  border-radius: 999px;
  background: rgba(247, 247, 248, 0.95);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.92),
    0 10px 22px rgba(0,0,0,0.04);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  padding: 6px;
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.phone-tab-btn {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  opacity: 1;
  transition: background 0.16s ease;
}

.phone-tab-btn.active {
  background: #dfdfe2;
}

.phone-tab-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.phone-tab-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  opacity: 0.92;
}

.phone-tab-label {
  font-size: 9.5px;
  line-height: 1;
  font-weight: 700;
  color: #161616;
  letter-spacing: -0.1px;
}

.phone-tab-btn.active .phone-tab-label {
  color: #3e83f8;
}

.phone-tab-btn.active .phone-tab-icon {
  opacity: 1;
}

.phone-search-btn {
  flex: 0 0 var(--phone-search-size);
  width: var(--phone-search-size);
  height: var(--phone-search-size);
  min-width: var(--phone-search-size);
  min-height: var(--phone-search-size);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: rgba(247, 247, 248, 0.95);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.92),
    0 10px 22px rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.phone-search-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

/* hover/active */
.phone-back-btn:active,
.phone-top-circle-btn:active,
.phone-recent-call-btn:active,
.phone-call-btn:active,
.phone-search-btn:active,
.phone-tab-btn:active {
  transform: scale(0.97);
}


/* 모바일 */
@media screen and (max-width: 480px) {
  .phone-ui {
    --phone-header-h: calc(96px + env(safe-area-inset-top));
    --phone-bottom-h: calc(118px + env(safe-area-inset-bottom));
    --phone-search-size: 68px;
    --phone-tabbar-h: 60px;
  }

  .phone-back-btn,
  .phone-top-circle-btn {
    top: calc(50px + env(safe-area-inset-top));
    width: 54px;
    height: 54px;
  }

  .phone-page-title {
    top: calc(58px + env(safe-area-inset-top));
    font-size: 22px;
  }

  .phone-plus-icon {
    width: 20px;
    height: 20px;
  }

  .phone-drawer-icon {
    width: 20px;
    height: 13px;
    background:
      linear-gradient(#111, #111) center top / 20px 2.5px no-repeat,
      linear-gradient(#111, #111) center center / 14px 2.5px no-repeat,
      linear-gradient(#111, #111) center bottom / 8px 2.5px no-repeat;
  }

.phone-keypad-wrap {
  top: calc(126px + env(safe-area-inset-top));
  padding-top: 0;
}

.phone-dial-display-wrap {
  margin-bottom: 8px;
}

.phone-dial-display {
  min-height: 34px;
  font-size: 28px;
  letter-spacing: -0.6px;
}

.phone-dial-easteregg {
  min-width: 180px;
  min-height: 34px;
  margin-top: 8px;
  padding: 0 16px;
  font-size: 12px;
}

.phone-keypad-grid {
  grid-template-columns: repeat(3, min(70px, 19vw));
  gap: 8px 9px;
}

.phone-key-btn {
  width: min(70px, 19vw);
  height: min(70px, 19vw);
}

.phone-key-num {
  font-size: clamp(28px, 6vw, 34px);
  letter-spacing: -0.6px;
}

.phone-key-sub {
  font-size: 8px;
  letter-spacing: 2.2px;
  padding-left: 1px;
}

.phone-key-plus {
  font-size: 12px;
  margin-top: 1px;
}

.phone-keypad-actions {
  margin-top: 6px;
}

.phone-call-btn {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
}

.phone-call-btn-icon {
  width: 24px;
  height: 24px;
}

.phone-clear-btn {
  left: calc(100% + 30px);
  width: 30px;
  height: 22px;
}

.phone-clear-btn-x {
  font-size: 18px;
  margin-left: 3px;
}
  
  .phone-contacts-list,
  .phone-recents-list {
    padding-top: 40px;
    padding-bottom: 14px;
  }

  .phone-contacts-scroll {
    padding-right: 36px;
  }

  .phone-my-card {
    min-height: 70px;
    gap: 14px;
    margin-bottom: 14px;
  }

  .phone-my-card-text {
    font-size: 17px;
  }

  .phone-contact-group-label {
    font-size: 13px;
    margin: 12px 0 6px 6px;
  }

  .phone-contact-row {
    min-height: 72px;
  }

  .phone-contact-main {
    min-height: 72px;
    margin-left: 14px;
  }

  .phone-contact-name {
    font-size: 16px;
    letter-spacing: -0.35px;
  }

  .phone-avatar {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
  }

  .phone-avatar-char {
    font-size: 25px;
    letter-spacing: -0.6px;
  }

  .phone-mycard-head {
    top: 9px;
    width: 15px;
    height: 15px;
  }

  .phone-mycard-body {
    bottom: 7px;
    width: 30px;
    height: 13px;
  }

  .phone-contacts-side-index {
    top: calc(144px + env(safe-area-inset-top));
    right: 6px;
    bottom: calc(var(--phone-bottom-h) + 4px);
  }

  .phone-contacts-side-index span {
    font-size: 7px;
  }

  .phone-contacts-count-inline {
    font-size: 15px;
  }

  .phone-recents-row {
    grid-template-columns: 48px minmax(0, 1fr) auto 40px;
    min-height: 82px;
    column-gap: 12px;
  }

  .phone-recents-row::after {
    left: 60px;
    right: 44px;
  }

  .phone-recents-main {
    min-height: 82px;
  }

  .phone-recents-name {
    font-size: 16px;
    letter-spacing: -0.35px;
  }

  .phone-recents-sub {
    margin-top: 4px;
    font-size: 13px;
  }

  .phone-recents-date {
    min-width: 46px;
    font-size: 14px;
    padding-right: 2px;
  }

  .phone-recent-call-btn {
    width: 40px;
    height: 40px;
  }

  .phone-recent-call-icon {
    width: 16px;
    height: 16px;
  }

  .phone-bottom-controls {
    padding: 8px 12px calc(12px + env(safe-area-inset-bottom));
    gap: 10px;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .phone-tabbar {
    padding: 5px;
  }

  .phone-tab-btn {
    border-radius: 20px;
  }

  .phone-tab-icon {
    width: 22px;
    height: 22px;
  }

  .phone-tab-label {
    font-size: 10px;
  }

  .phone-search-icon {
    width: 22px;
    height: 22px;
  }
}

/* 데스크톱 프레임용 미세 보정 */
@media screen and (min-width: 481px) {
  .phone-page-title {
    font-size: 22px;
  }

  .phone-contact-name,
  .phone-recents-name {
    font-size: 16px;
  }

  .phone-recents-row::after {
    left: 60px;
    right: 42px;
  }

 .phone-keypad-wrap {
  top: calc(148px + var(--safe-top));
  left: 0;
  right: 0;
  bottom: var(--phone-bottom-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 0;
}

.phone-keypad-grid {
  width: fit-content;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 92px);
  gap: 10px 12px;
  justify-content: center;
  justify-items: center;
}

.phone-call-btn {
  width: 74px;
  height: 74px;
  min-width: 74px;
  min-height: 74px;
  align-self: center;
}

.phone-call-btn-icon {
  width: 28px;
  height: 28px;
  }
}
  
/* ============================= */
/* PHOTOS APP */
/* ============================= */

.photos-screen {
  background: #111;
  color: #fff;
}

.photos-ui {
  position: relative;
  height: 100%;
  background: #111;
  overflow: hidden;
}

.photos-page {
  position: absolute;
  inset: 0;
  background: #111;
  overflow: hidden;
  transition:
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease;
}

.photos-grid-page {
  transform: translateX(0);
  opacity: 1;
  z-index: 1;
}

.photos-detail-page {
  transform: translateX(100%);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
}

.photos-screen.detail-open .photos-grid-page {
  transform: translateX(-18%);
  opacity: 0;
}

.photos-screen.detail-open .photos-detail-page {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* 상단 */
.photos-grid-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(120px + var(--safe-top));
  z-index: 20;
  pointer-events: none;
}

.photos-grid-topbar-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.28) 0%,
    rgba(0,0,0,0.15) 34%,
    rgba(0,0,0,0.06) 64%,
    rgba(0,0,0,0) 100%
  );
  pointer-events: none;
}

.photos-home-back,
.photos-grid-actions {
  z-index: 21;
}

.photos-home-back {
  position: absolute;
  top: calc(50px + var(--safe-top));
  left: 14px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(120,120,120,0.18);
  border: 1px solid rgba(255,255,255,0.26);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 4px 14px rgba(0,0,0,0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.photos-home-back .back-arrow {
  border-left-color: #fff;
  border-bottom-color: #fff;
}

.photos-grid-actions {
  position: absolute;
  top: calc(50px + var(--safe-top));
  right: 14px;
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.photos-glass-btn {
  height: 50px;
  min-width: 50px;
  padding: 0 18px;
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(120,120,120,0.18);
  border: 1px solid rgba(255,255,255,0.24);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 4px 14px rgba(0,0,0,0.16);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.photos-sort-btn {
  width: 50px;
  padding: 0;
  border-radius: 50%;
}

.photos-sort-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 14px;
  background:
    linear-gradient(#fff, #fff) center top / 18px 2.4px no-repeat,
    linear-gradient(#fff, #fff) center center / 12px 2.4px no-repeat,
    linear-gradient(#fff, #fff) center bottom / 6px 2.4px no-repeat;
}

/* 목록 스크롤 영역 */
.photos-grid-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-top: calc(94px + var(--safe-top));
  padding-bottom: calc(104px + var(--safe-bottom));
}

.photos-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  width: 100%;
  align-content: start;
}

.photos-thumb-btn {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #1a1a1a;
  border: 0;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
}

.photos-thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 하단 바 */
.photos-bottom-bar {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(14px + var(--safe-bottom));
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.photos-bottom-pill {
  flex: 1;
  min-width: 0;
  height: 78px;
  padding: 6px;
  display: grid;
  grid-template-columns: 64px repeat(3, 1fr);
  align-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.78);
  color: #111;
}

.photos-bottom-tab {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  border-radius: 999px;
  color: #111;
}

.photos-bottom-tab-active {
  color: #2f6fff;
}

.photos-bottom-tab-icon-btn {
  padding: 0;
}

.photos-bottom-tab-image {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.photos-search-btn {
  flex: 0 0 78px;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: rgba(255,255,255,0.86);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photos-search-image {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

/* 상세 */
.photos-detail-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(96px + var(--safe-top));
  z-index: 30;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.20) 0%,
    rgba(0,0,0,0.08) 50%,
    rgba(0,0,0,0) 100%
  );
}

.photos-detail-back {
  position: absolute;
  top: calc(50px + var(--safe-top));
  left: 14px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 8px 20px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 31;
  pointer-events: auto;
}

.photos-detail-back .back-arrow {
  border-left-color: #fff;
  border-bottom-color: #fff;
}

.photos-detail-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: #000;
}

.photos-detail-stage {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24px + var(--safe-top)) 0 calc(24px + var(--safe-bottom));
  background: #000;
}

.photos-detail-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #000;
}

.photos-detail-video {
  width: 100%;
  height: auto;
  max-height: 100%;
  display: block;
  background: #000;
}

/* active */
.photos-glass-btn:active,
.photos-search-btn:active,
.photos-bottom-tab:active,
.photos-detail-back:active,
.photos-home-back:active {
  transform: scale(0.97);
}

/* 모바일 */
@media screen and (max-width: 480px) {
  .photos-grid-topbar {
    height: calc(82px + env(safe-area-inset-top));
  }

  .photos-grid-topbar-bg {
    background: linear-gradient(
      to bottom,
      rgba(0,0,0,0.18) 0%,
      rgba(0,0,0,0.08) 34%,
      rgba(0,0,0,0.02) 64%,
      rgba(0,0,0,0) 100%
    );
  }

  .photos-home-back {
    top: calc(48px + env(safe-area-inset-top));
    left: 14px;
    width: 46px;
    height: 46px;
    z-index: 41;
  }

  .photos-grid-actions {
    top: calc(48px + env(safe-area-inset-top));
    right: 14px;
    gap: 8px;
    z-index: 41;
  }

  .photos-glass-btn {
    height: 46px;
    min-width: 46px;
    padding: 0 16px;
    font-size: 15px;
  }

  .photos-sort-btn {
    width: 46px;
  }

  .photos-grid-scroll {
    inset: 0;
    padding-top: calc(88px + env(safe-area-inset-top));
    padding-bottom: calc(102px + env(safe-area-inset-bottom));
  }

  .photos-bottom-bar {
    left: 14px;
    right: 14px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    gap: 10px;
  }

  .photos-bottom-pill {
    height: 80px;
    grid-template-columns: 60px repeat(3, 1fr);
    padding: 6px;
  }

  .photos-bottom-tab {
    font-size: 15px;
  }

  .photos-bottom-tab-image {
    width: 30px;
    height: 30px;
  }

  .photos-search-btn {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
  }

  .photos-search-image {
    width: 32px;
    height: 32px;
  }

  .photos-detail-topbar {
    height: calc(88px + env(safe-area-inset-top));
  }

  .photos-detail-back {
    top: calc(48px + env(safe-area-inset-top));
    left: 14px;
    width: 46px;
    height: 46px;
  }

  .photos-detail-stage {
    padding-top: calc(18px + env(safe-area-inset-top));
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }
}


/* ============================= */
/* CALENDAR APP */
/* ============================= */

.calendar-screen {
  background: #f5f5f7;
  color: #111;
}

.calendar-ui {
  position: relative;
  height: 100%;
  background: #f5f5f7;
  overflow: hidden;
}

.calendar-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: calc(130px + var(--safe-top));
  padding-top: calc(42px + var(--safe-top));
  padding-left: 16px;
  padding-right: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  background: linear-gradient(
    to bottom,
    rgba(245, 245, 247, 0.96) 0%,
    rgba(245, 245, 247, 0.90) 70%,
    rgba(245, 245, 247, 0) 100%
  );
  pointer-events: none;
}

.calendar-back-btn {
  left: 16px;
  top: calc(42px + var(--safe-top));
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 6px 16px rgba(0,0,0,0.08);
  pointer-events: auto;
}

.calendar-back-btn .back-arrow {
  border-left-color: #111;
  border-bottom-color: #111;
}

.calendar-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.calendar-top-pill-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.32),
    0 6px 16px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-top-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

.calendar-plus-btn span {
  display: block;
  font-size: 24px;
  line-height: 1;
  font-weight: 300;
  color: #ff3b30;
  transform: translateY(-1px);
}

.calendar-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-top: calc(90px + var(--safe-top));
  padding-bottom: calc(110px + var(--safe-bottom));
}

.calendar-months {
  display: flex;
  flex-direction: column;
  gap: 34px;
  padding: 12px 14px 24px;
}

.calendar-month {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calendar-month-title {
  margin: 0;
  padding: 0 4px;
  font-size: 34px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -1.3px;
  color: #111;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  padding: 0 2px;
}

.calendar-weekday {
  text-align: center;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  color: #8e8e93;
  letter-spacing: -0.2px;
}

.calendar-weekday.is-sunday {
  color: #9b9ba0;
}

.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px 4px;
}

.calendar-day {
  min-height: 92px;
  border-radius: 16px;
  padding: 4px 1px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.calendar-day.is-empty {
  pointer-events: none;
}

.calendar-day-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: #1c1c1e;
}

.calendar-day.is-sunday .calendar-day-number {
  color: #8f8f94;
}

.calendar-day.is-today .calendar-day-number {
  background: #ff3b30;
  color: #fff;
}

.calendar-badge,
.calendar-event {
  width: 100%;
  border-radius: 10px;
  padding: 4px 4px 3px;
  background: #ece8ff;
  color: #6b5bd2;
  font-size: 8.5px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.2px;
  text-align: left;
  overflow: hidden;
  box-sizing: border-box;
}

.calendar-badge {
  height: 18px;
  min-height: 18px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.calendar-event {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 24px;
}

.calendar-event-title,
.calendar-event-time {
  display: block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-event-title {
  font-size: 8.5px;
  line-height: 1.1;
}

.calendar-event-time {
  font-size: 8px;
  line-height: 1.1;
  opacity: 0.92;
}

.calendar-bottom-bar {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(14px + var(--safe-bottom));
  z-index: 24;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calendar-today-btn {
  height: 46px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.36),
    0 8px 18px rgba(0,0,0,0.08);
  color: #ff3b30;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.calendar-bottom-pill {
  height: 46px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.36),
    0 8px 18px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 2px;
}

.calendar-bottom-pill-btn {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-bottom-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.calendar-top-pill-btn:active,
.calendar-today-btn:active,
.calendar-bottom-pill-btn:active,
.calendar-back-btn:active {
  transform: scale(0.96);
}

@media screen and (max-width: 480px) {
  .calendar-topbar {
    height: calc(118px + env(safe-area-inset-top));
    padding-top: calc(36px + env(safe-area-inset-top));
    padding-left: 14px;
    padding-right: 14px;
  }

  .calendar-back-btn {
    left: 14px;
    top: calc(36px + env(safe-area-inset-top));
  }

  .calendar-top-pill-btn {
    width: 40px;
    height: 40px;
  }

  .calendar-scroll {
    padding-top: calc(78px + env(safe-area-inset-top));
    padding-bottom: calc(98px + env(safe-area-inset-bottom));
  }

  .calendar-months {
    gap: 28px;
    padding: 10px 12px 20px;
  }

  .calendar-month-title {
    font-size: 32px;
  }

  .calendar-month-grid {
    gap: 6px 3px;
  }

  .calendar-day {
    min-height: 84px;
  }

  .calendar-day-number {
    width: 26px;
    height: 26px;
    font-size: 17px;
  }

.calendar-badge,
.calendar-event {
  border-radius: 9px;
  padding: 4px 4px 3px;
  font-size: 8px;
}

.calendar-badge {
  height: 17px;
  min-height: 17px;
}

.calendar-event-title {
  font-size: 8px;
}

.calendar-event-time {
  font-size: 7.5px;
}
  .calendar-bottom-bar {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .calendar-today-btn {
    height: 44px;
    padding: 0 16px;
    font-size: 15px;
  }

  .calendar-bottom-pill {
    height: 44px;
  }

  .calendar-bottom-pill-btn {
    width: 36px;
    height: 36px;
  }
}


/* ============================= */
/* KAKAO APP */
/* ============================= */

.kakao-screen {
  background: #bcc9d8;
  color: #111;
}

.kakao-ui {
  position: relative;
  height: 100%;
  background: #bcc9d8;
  overflow: hidden;
}

/* 상단 */
.kakao-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 28;
  height: calc(92px + var(--safe-top));
  background: #bcc9d8;
}

.kakao-back-btn {
  position: absolute;
  left: 18px;
  top: calc(56px + var(--safe-top));
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  border: none;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kakao-back-btn::before,
.kakao-back-btn::after {
  display: none !important;
  content: none !important;
}

.kakao-back-btn .back-arrow {
  width: 12px;
  height: 12px;
  border-left-width: 2.2px;
  border-bottom-width: 2.2px;
  border-left-color: #111;
  border-bottom-color: #111;
}

.kakao-top-title-wrap {
  position: absolute;
  left: 50%;
  top: calc(58px + var(--safe-top));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  pointer-events: none;
}

.kakao-room-title {
  margin: 0;
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #111;
  text-align: center;
  white-space: nowrap;
}
.kakao-top-actions {
  position: absolute;
  right: 18px;
  top: calc(54px + var(--safe-top));
  display: flex;
  align-items: center;
  gap: 10px;
}

.kakao-top-icon-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kakao-top-icon {
  width: 19px;
  height: 19px;
  object-fit: contain;
  display: block;
}

/* 스크롤 */
.kakao-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-top: calc(118px + var(--safe-top));
  padding-bottom: calc(88px + var(--safe-bottom));
}

.kakao-conversation {
  padding: 12px 14px 18px;
}

/* 날짜 구분선 */
.kakao-date-divider {
  display: flex;
  justify-content: center;
  margin: 18px 0 22px;
}

.kakao-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(132, 145, 161, 0.60);
  color: rgba(255,255,255,0.96);
  font-size: 12px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.2px;
}

.kakao-date-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  display: block;
}

.kakao-date-chevron {
  font-size: 14px;
  line-height: 1;
  opacity: 0.92;
  transform: translateY(-0.5px);
}

/* 메시지 */
.kakao-message-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
}

.kakao-message-row.is-me {
  justify-content: flex-end;
  gap: 8px;
}

.kakao-avatar {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  overflow: hidden;
  background: #aab7ef;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kakao-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kakao-avatar-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  background: #aab7ef;
}

.kakao-avatar-placeholder::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.72);
  transform: translateX(-50%);
}

.kakao-avatar-placeholder::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 21px;
  height: 12px;
  border-radius: 999px 999px 8px 8px;
  background: rgba(255,255,255,0.72);
  transform: translateX(-50%);
}

.kakao-message-main {
  max-width: calc(100% - 90px);
  min-width: 0;
}

.kakao-message-row.is-me .kakao-message-main {
  max-width: calc(100% - 58px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.kakao-sender-name {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1;
  font-weight: 500;
  color: rgba(37, 45, 57, 0.62);
  letter-spacing: -0.2px;
}

.kakao-bubble-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.kakao-message-row.is-me .kakao-bubble-stack {
  align-items: flex-end;
}

.kakao-bubble-line {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.kakao-message-row.is-me .kakao-bubble-line {
  flex-direction: row-reverse;
}

.kakao-bubble {
  max-width: 100%;
  min-height: 36px;
  padding: 10px 15px 9px;
  border-radius: 18px;
  background: #ffffff;
  color: #111;
  font-size: 15px;
  line-height: 1.34;
  font-weight: 500;
  letter-spacing: -0.32px;
  word-break: break-all;
  white-space: pre-wrap;
}

.kakao-bubble.is-me {
  background: #fae54d;
}

.kakao-time {
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 1;
  font-weight: 500;
  color: rgba(52, 61, 73, 0.52);
  letter-spacing: -0.2px;
  margin-bottom: 2px;
}

/* 이미지 메시지 */
.kakao-media-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.kakao-message-row.is-me .kakao-media-block {
  align-items: flex-end;
}

.kakao-media-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kakao-message-row.is-me .kakao-media-wrap {
  flex-direction: row-reverse;
}

.kakao-media-time-line {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

.kakao-message-row.is-me .kakao-media-time-line {
  justify-content: flex-end;
}

.kakao-media-group {
  display: grid;
  gap: 4px;
  overflow: hidden;
  border-radius: 16px;
}

.kakao-media-group.is-1 {
  display: block;
  width: 232px;
}

.kakao-media-group.is-2 {
  grid-template-columns: repeat(2, 1fr);
  width: 232px;
}

.kakao-media-group.is-3,
.kakao-media-group.is-4 {
  grid-template-columns: repeat(2, 1fr);
  width: 232px;
}

.kakao-media-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255,255,255,0.32);
}

.kakao-media-group.is-1 .kakao-media-item {
  aspect-ratio: auto;
}

.kakao-media-group.is-2 .kakao-media-item,
.kakao-media-group.is-3 .kakao-media-item,
.kakao-media-group.is-4 .kakao-media-item {
  aspect-ratio: 1 / 1;
}

.kakao-media-group.is-1 .kakao-media-item img {
  width: 100%;
  height: auto;
  max-height: 340px;
  object-fit: contain;
  display: block;
}

.kakao-media-group.is-2 .kakao-media-item img,
.kakao-media-group.is-3 .kakao-media-item img,
.kakao-media-group.is-4 .kakao-media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kakao-media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kakao-share-btn {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(132, 145, 161, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  align-self: center;
}

.kakao-share-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  display: block;
}

/* 하단 입력창 */
.kakao-inputbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 26;
  height: calc(64px + var(--safe-bottom));
  padding: 10px 12px calc(10px + var(--safe-bottom));
  background: #ffffff;
  border-top: 1px solid rgba(60, 60, 67, 0.08);
  display: flex;
  align-items: center;
  gap: 8px;
}

.kakao-input-side-btn {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kakao-plus-icon {
  font-size: 36px;
  line-height: 1;
  font-weight: 300;
  color: #111;
  transform: translateY(-1px);
}

.kakao-input-placeholder {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 18px;
  border-radius: 22px;
  background: #f0f0f0;
  color: rgba(17,17,17,0.28);
  font-size: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.kakao-input-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

.kakao-top-icon-btn:active,
.kakao-input-side-btn:active,
.kakao-share-btn:active,
.kakao-back-btn:active {
  transform: scale(0.96);
}

@media screen and (max-width: 480px) {
  .kakao-topbar {
  height: calc(84px + env(safe-area-inset-top));
}

.kakao-back-btn {
  left: 14px;
  top: calc(52px + env(safe-area-inset-top));
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.kakao-top-title-wrap {
  top: calc(54px + env(safe-area-inset-top));
}

  .kakao-room-title {
    font-size: 16px;
  }

 .kakao-top-actions {
  right: 14px;
  top: calc(50px + env(safe-area-inset-top));
  gap: 8px;
}

  .kakao-top-icon-btn {
    width: 28px;
    height: 28px;
  }

  .kakao-top-icon {
    width: 19px;
    height: 19px;
  }

  .kakao-scroll {
    padding-top: calc(108px + env(safe-area-inset-top));
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .kakao-conversation {
    padding: 10px 10px 16px;
  }

  .kakao-date-divider {
    margin: 18px 0 20px;
  }

  .kakao-date-pill {
    min-height: 32px;
    padding: 0 13px;
    font-size: 11.5px;
  }

  .kakao-date-icon {
    width: 13px;
    height: 13px;
  }

  .kakao-message-row {
    gap: 8px;
    margin-bottom: 16px;
  }

  .kakao-avatar {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .kakao-message-main {
    max-width: calc(100% - 72px);
  }

  .kakao-message-row.is-me .kakao-message-main {
    max-width: calc(100% - 52px);
  }

  .kakao-sender-name {
    margin-bottom: 7px;
  }

  .kakao-bubble-stack {
    gap: 6px;
  }

  .kakao-bubble-line {
    gap: 7px;
  }

  .kakao-bubble {
    min-height: 34px;
    padding: 9px 14px 8px;
    font-size: 14px;
  }

  .kakao-time {
    font-size: 10px;
  }

  .kakao-media-block {
    gap: 5px;
  }

  .kakao-media-group.is-1 {
  width: 214px;
}

.kakao-media-group.is-2,
.kakao-media-group.is-3,
.kakao-media-group.is-4 {
  width: 214px;
}

.kakao-media-group.is-1 .kakao-media-item img {
  max-height: 300px;
}

  .kakao-share-btn {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .kakao-share-icon {
    width: 13px;
    height: 13px;
  }

  .kakao-inputbar {
    height: calc(60px + env(safe-area-inset-bottom));
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    gap: 6px;
  }

  .kakao-input-side-btn {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .kakao-input-placeholder {
    height: 42px;
    padding: 0 16px;
    font-size: 14px;
  }

  .kakao-plus-icon {
    font-size: 32px;
  }

  .kakao-input-icon {
    width: 15px;
    height: 15px;
  }
}


/* ============================= */
/* INSTAGRAM APP */
/* ============================= */

.instagram-screen {
  background: #fafafa;
  color: #111;
}

.instagram-ui {
  position: relative;
  height: 100%;
  background: #fafafa;
  overflow: hidden;
}

.instagram-page {
  position: absolute;
  inset: 0;
  background: #fafafa;
  transition:
    opacity 0.28s ease,
    transform 0.32s ease;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.instagram-page.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.instagram-profile-page {
  z-index: 2;
}

.instagram-story-page {
  z-index: 4;
  background: #000;
}

.instagram-post-detail-page {
  z-index: 3;
  background: #fafafa;
}

/* 프로필 상단 */
.instagram-profile-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12;
  height: calc(94px + var(--safe-top));
  padding: calc(48px + var(--safe-top)) 16px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: #fafafa;
}

.instagram-home-back {
  top: calc(46px + var(--safe-top));
  left: 16px;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  width: 28px;
  height: 28px;
}

.instagram-profile-title-wrap {
  position: absolute;
  left: 56px;
  top: calc(50px + var(--safe-top));
  display: flex;
  align-items: center;
}

.instagram-profile-username {
  font-size: 16px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.25px;
  color: #111;
}

.instagram-profile-top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.instagram-top-icon-btn {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.instagram-top-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

/* 프로필 스크롤 */
.instagram-profile-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-top: calc(90px + var(--safe-top));
  padding-bottom: calc(20px + var(--safe-bottom));
}

.instagram-profile-header {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items: center;
  padding: 16px 14px 6px;
}

.instagram-story-ring-btn {
  width: 108px;
  height: 108px;
  border: none;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.instagram-story-ring {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f7b733, #fc4a1a 35%, #d6249f 70%, #7b3cff);
  padding: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.instagram-profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid #fafafa;
  object-fit: cover;
  background: #ececef;
}

.instagram-profile-meta {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.instagram-profile-name {
  font-size: 14px;
  line-height: 1.05;
  font-weight: 700;
  color: #111;
}

.instagram-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  text-align: center;
  transform: translateX(-20px);
}

.instagram-profile-stat strong {
  display: block;
  font-size: 16px;
  line-height: 1.05;
  font-weight: 800;
  color: #111;
}

.instagram-profile-stat span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.15;
  font-weight: 500;
  color: #111;
}

.instagram-profile-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 14px 14px;
}

.instagram-profile-action-btn {
  height: 40px;
  border-radius: 10px;
  background: #efeff3;
  color: #111;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.instagram-profile-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  border-bottom: 1px solid rgba(60,60,67,0.12);
}

.instagram-tab-btn {
  position: relative;
  height: 50px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.35;
}

.instagram-tab-btn.active {
  opacity: 1;
}

.instagram-tab-btn.active::after {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: #111;
}

.instagram-tab-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.instagram-post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(60,60,67,0.10);
}

.instagram-grid-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #ddd;
  border: none;
  padding: 0;
}

.instagram-grid-preview {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.instagram-grid-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.instagram-grid-stack-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10%;
  max-width: 17px;
  min-width: 13px;
  aspect-ratio: 1 / 1;
  z-index: 2;
  pointer-events: none;
}

.instagram-grid-stack-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ============================= */
/* INSTAGRAM STORY */
/* ============================= */

.phone:has(.instagram-screen.active .instagram-story-page.active) .dynamic-island {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.phone:has(.instagram-screen.active .instagram-story-page.active) .statusbar {
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

.phone:has(.instagram-screen.active .instagram-story-page.active) .status-left {
  color: #fff;
}

.phone:has(.instagram-screen.active .instagram-story-page.active) .cellular i {
  background: #fff;
}

.phone:has(.instagram-screen.active .instagram-story-page.active) .wifi::before,
.phone:has(.instagram-screen.active .instagram-story-page.active) .wifi::after {
  border-top-color: #fff;
}

.phone:has(.instagram-screen.active .instagram-story-page.active) .wifi-dot {
  background: #fff;
}

.phone:has(.instagram-screen.active .instagram-story-page.active) .battery {
  border-color: #fff;
}

.phone:has(.instagram-screen.active .instagram-story-page.active) .battery::after,
.phone:has(.instagram-screen.active .instagram-story-page.active) .battery-level {
  background: #fff;
}

.instagram-story-page {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: #05080c;
  overflow: hidden;
}

.instagram-story-progress {
  position: absolute;
  top: calc(32px + var(--safe-top));
  left: 16px;
  right: 16px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.instagram-story-progress-bar {
  height: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.28);
  overflow: hidden;
}

.instagram-story-progress-fill {
  width: 0%;
  height: 100%;
  background: rgba(255,255,255,0.92);
  border-radius: inherit;
}

.instagram-story-progress-bar.is-done .instagram-story-progress-fill {
  width: 100%;
}

.instagram-story-progress-bar.is-active .instagram-story-progress-fill {
  width: 40%;
}

.instagram-story-topbar {
  position: absolute;
  top: calc(46px + var(--safe-top));
  left: 16px;
  right: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.instagram-story-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.instagram-story-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: #ddd;
}

.instagram-story-username {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.instagram-story-time {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.82;
}

.instagram-story-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.instagram-story-icon-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.instagram-story-top-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}

.instagram-story-close-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 38px;
  line-height: 0.7;
  font-weight: 200;
}

.instagram-story-stage {
  position: absolute;
  top: calc(86px + var(--safe-top));
  left: 0;
  right: 0;
  bottom: calc(88px + var(--safe-bottom));
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #05080c;
  overflow: hidden;
}

.instagram-story-stage img,
.instagram-story-stage video,
.instagram-story-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  background: #05080c;
}

.instagram-story-bottombar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(18px + var(--safe-bottom));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
}

.instagram-story-message-pill {
  flex: 1;
  min-width: 0;
  height: 50px;
  border-radius: 25px;
  border: 1.5px solid rgba(255,255,255,0.48);
  color: rgba(255,255,255,0.92);
  font-size: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
  padding: 0 18px;
}

.instagram-story-bottom-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.instagram-story-bottom-btn {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.instagram-story-bottom-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}

.instagram-story-hit {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  border: none;
  background: transparent;
  z-index: 10;
}

.instagram-story-hit-left {
  left: 0;
}

.instagram-story-hit-right {
  right: 0;
}

@media screen and (max-width: 480px) {
  .instagram-story-progress {
    top: calc(18px + var(--safe-top));
    left: 12px;
    right: 12px;
    gap: 4px;
  }

  .instagram-story-topbar {
    top: calc(34px + var(--safe-top));
    left: 14px;
    right: 14px;
  }

  .instagram-story-avatar {
    width: 32px;
    height: 32px;
  }

  .instagram-story-username {
    font-size: 14px;
  }

  .instagram-story-time {
    font-size: 13px;
  }

  .instagram-story-top-icon {
    width: 17px;
    height: 17px;
  }

  .instagram-story-close-btn {
    width: 30px;
    height: 30px;
    font-size: 34px;
  }

  .instagram-story-stage {
    top: calc(88px + var(--safe-top));
    bottom: calc(86px + var(--safe-bottom));
  }

  .instagram-story-bottombar {
    left: 14px;
    right: 14px;
    bottom: calc(14px + var(--safe-bottom));
    gap: 12px;
  }

  .instagram-story-message-pill {
    height: 50px;
    border-radius: 25px;
    padding: 0 18px;
    font-size: 15px;
  }

  .instagram-story-bottom-actions {
    gap: 12px;
  }

  .instagram-story-bottom-btn {
    width: 32px;
    height: 32px;
  }

  .instagram-story-bottom-icon {
    width: 29px;
    height: 29px;
  }
}

/* 게시물 상세 */
.instagram-post-detail-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 14;
  height: calc(92px + var(--safe-top));
  background: #fafafa;
}

.instagram-post-detail-back {
  top: calc(42px + var(--safe-top));
  left: 16px;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.instagram-post-detail-title-wrap {
  position: absolute;
  left: 50%;
  top: calc(46px + var(--safe-top));
  transform: translateX(-50%);
  text-align: center;
}

.instagram-post-detail-title {
  font-size: 14px;
  line-height: 1.05;
  font-weight: 800;
  color: #111;
}

.instagram-post-detail-subtitle {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1;
  font-weight: 500;
  color: #222;
}

.instagram-post-detail-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-top: calc(88px + var(--safe-top));
  padding-bottom: calc(20px + var(--safe-bottom));
}

.instagram-post-detail-card {
  background: #fafafa;
}

.instagram-post-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  border-top: 1px solid rgba(60,60,67,0.08);
  border-bottom: 1px solid rgba(60,60,67,0.08);
  background: #fafafa;
}

.instagram-post-detail-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.instagram-post-detail-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: #ddd;
}

.instagram-post-detail-username {
  font-size: 13px;
  font-weight: 700;
  color: #111;
}

.instagram-post-detail-more-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  padding: 0;
}

.instagram-post-detail-more-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.instagram-post-media-wrap {
  position: relative;
  background: #fff;
}

.instagram-post-counter {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  min-width: 46px;
  height: 30px;
  padding: 0 10px;
  border-radius: 15px;
  background: rgba(0,0,0,0.42);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.instagram-post-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
}

.instagram-post-slider.dragging {
  cursor: grabbing;
}

.instagram-post-slider::-webkit-scrollbar {
  display: none;
}

.instagram-post-slide {
  flex: 0 0 100%;
  width: 100%;
  min-height: 520px;
  scroll-snap-align: start;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.instagram-post-slide img,
.instagram-post-slide video {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  display: block;
  background: #fff;
}

.instagram-post-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px 0 2px;
  background: #fff;
}

.instagram-post-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(20,20,20,0.16);
}

.instagram-post-dot.active {
  background: #5b67f1;
}

.instagram-post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 0;
}

.instagram-post-actions-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.instagram-post-action-btn {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.instagram-post-action-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

.instagram-post-caption {
  padding: 8px 14px 0;
  font-size: 14px;
  line-height: 1.3;
  color: #111;
  word-break: break-all;
}

.instagram-post-caption strong {
  font-weight: 800;
  margin-right: 6px;
}

.instagram-post-time {
  padding: 8px 14px 0;
  font-size: 12px;
  line-height: 1;
  font-weight: 500;
  color: rgba(20,20,20,0.62);
}

.instagram-top-icon-btn:active,
.instagram-profile-action-btn:active,
.instagram-tab-btn:active,
.instagram-grid-item:active,
.instagram-story-ring-btn:active,
.instagram-story-icon-btn:active,
.instagram-story-bottom-btn:active,
.instagram-post-action-btn:active,
.instagram-post-detail-more-btn:active,
.instagram-post-detail-back:active,
.instagram-home-back:active {
  transform: scale(0.96);
}

@media screen and (max-width: 480px) {
  .instagram-profile-topbar {
    height: calc(86px + env(safe-area-inset-top));
    padding: calc(44px + env(safe-area-inset-top)) 14px 0;
  }

  .instagram-home-back {
    top: calc(42px + env(safe-area-inset-top));
    left: 14px;
    width: 26px;
    height: 26px;
  }

  .instagram-profile-title-wrap {
    left: 52px;
    top: calc(46px + env(safe-area-inset-top));
  }

  .instagram-profile-username {
    font-size: 15px;
  }

  .instagram-profile-top-actions {
    gap: 12px;
  }

  .instagram-top-icon {
    width: 21px;
    height: 21px;
  }

  .instagram-profile-scroll {
    padding-top: calc(82px + env(safe-area-inset-top));
  }

  .instagram-profile-header {
    grid-template-columns: 104px 1fr;
    gap: 8px;
    padding: 14px 14px 4px;
  }

  .instagram-story-ring-btn {
    width: 96px;
    height: 96px;
  }

  .instagram-story-ring {
    width: 92px;
    height: 92px;
  }

  .instagram-profile-meta {
    gap: 12px;
  }

  .instagram-profile-name {
    font-size: 13px;
  }

  .instagram-profile-stats {
    transform: translateX(-24px);
  }

  .instagram-profile-stat strong {
    font-size: 15px;
  }

  .instagram-profile-stat span {
    font-size: 10px;
  }

  .instagram-profile-buttons {
    gap: 8px;
    padding: 10px 14px 12px;
  }

  .instagram-profile-action-btn {
    height: 36px;
    font-size: 12px;
    font-weight: 600;
  }

  .instagram-tab-btn {
    height: 48px;
  }

  .instagram-tab-btn.active::after {
    left: 22px;
    right: 22px;
  }

  .instagram-tab-icon {
    width: 23px;
    height: 23px;
  }

  .instagram-grid-stack-icon {
    width: 15px;
    height: 15px;
    top: 6px;
    right: 6px;
  }

.instagram-grid-stack-badge {
  top: 5px;
  right: 5px;
  width: 10%;
  max-width: 16px;
  min-width: 12px;
}

  .instagram-story-progress {
    top: calc(26px + env(safe-area-inset-top));
    left: 12px;
    right: 12px;
    gap: 4px;
  }

  .instagram-story-topbar {
    top: calc(38px + env(safe-area-inset-top));
    left: 12px;
    right: 12px;
  }

  .instagram-story-avatar {
    width: 32px;
    height: 32px;
  }

  .instagram-story-username {
    font-size: 14px;
  }

  .instagram-story-time {
    font-size: 13px;
  }

  .instagram-story-actions {
    gap: 10px;
  }

  .instagram-story-top-icon {
    width: 18px;
    height: 18px;
  }

  .instagram-story-close-btn {
    width: 28px;
    height: 28px;
    font-size: 36px;
  }

  .instagram-story-bottombar {
    left: 12px;
    right: 12px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    gap: 10px;
  }

  .instagram-story-message-pill {
    height: 46px;
    border-radius: 23px;
    font-size: 15px;
    padding: 0 16px;
  }

  .instagram-story-bottom-actions {
    gap: 10px;
  }

  .instagram-story-bottom-icon {
    width: 28px;
    height: 28px;
  }

  .instagram-post-detail-topbar {
    height: calc(84px + env(safe-area-inset-top));
  }

  .instagram-post-detail-back {
    top: calc(40px + env(safe-area-inset-top));
    left: 14px;
    width: 26px;
    height: 26px;
  }

  .instagram-post-detail-title-wrap {
    top: calc(50px + env(safe-area-inset-top));
  }

  .instagram-post-detail-title {
    font-size: 12px;
  }

  .instagram-post-detail-subtitle {
    font-size: 10px;
  }

  .instagram-post-detail-scroll {
    padding-top: calc(80px + env(safe-area-inset-top));
  }

  .instagram-post-detail-head {
    padding: 10px 12px 8px;
  }

  .instagram-post-detail-avatar {
    width: 30px;
    height: 30px;
  }

  .instagram-post-detail-username {
    font-size: 12px;
  }

  .instagram-post-counter {
    top: 10px;
    right: 10px;
    min-width: 40px;
    height: 26px;
    padding: 0 9px;
    font-size: 12px;
  }

  .instagram-post-slide {
    min-height: 430px;
  }

  .instagram-post-slide img,
  .instagram-post-slide video {
    max-height: 430px;
  }

  .instagram-post-dots {
    gap: 7px;
    padding: 10px 0 2px;
  }

  .instagram-post-dot {
    width: 7px;
    height: 7px;
  }

  .instagram-post-action-icon {
    width: 25px;
    height: 25px;
  }

  .instagram-post-caption {
    padding: 8px 12px 0;
    font-size: 13px;
  }

  .instagram-post-time {
    padding: 8px 12px 0;
    font-size: 11px;
  }
}


/* =============================
   XL BRANCH VISIBILITY
============================= */

.phone-xl {
  display: none;
}

.phone.branch-hidden {
  display: none !important;
}

.phone.phone-xl.branch-active {
  display: block;
}

.phone.phone-xl[aria-hidden="true"] {
  pointer-events: none;
}

.phone.phone-xl[aria-hidden="false"] {
  pointer-events: auto;
}

/* =============================
   XL WALLPAPER TEST
============================= */

#xlPhone .wallpaper-lock {
  background: url("assets/wallpaper/xl_wallpaper_lock.jpeg") center / cover no-repeat;
}

#xlPhone .wallpaper-passcode {
  background:
    linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18)),
    url("assets/wallpaper/xl_wallpaper_lock.jpeg") center / cover no-repeat;
}

#xlPhone .wallpaper-home {
  background:
    linear-gradient(rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0.10)),
    url("assets/wallpaper/xl_wallpaper_lock.jpeg") center / cover no-repeat;
  filter: blur(12px);
  transform: scale(1.08);
}


/* =============================
   방명록 분기
============================= */
.reply-page {
  position: fixed;
  inset: 0;
  background: #efeded;
  z-index: 9999;
  display: none;
  overflow-y: auto;
}

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

.reply-shell {
  min-height: 100%;
  padding: 48px 24px;
  box-sizing: border-box;
}

.reply-frame {
  max-width: 1180px;
  margin: 0 auto;
  border: 1.5px solid #7f7f7f;
  border-radius: 36px;
  background: #ece8e8;
  padding: 28px;
  box-sizing: border-box;
}

.reply-top-card,
.reply-board-card {
  border: 1.5px solid #7f7f7f;
  border-radius: 24px;
  background: #efeded;
}

.reply-top-card {
  display: flex;
  gap: 28px;
  padding: 28px;
  margin-bottom: 20px;
}

.reply-profile-photo-wrap {
  width: 300px;
  flex-shrink: 0;
}

.reply-profile-photo {
  width: 100%;
  display: block;
  border-radius: 8px;
}

.reply-profile-meta {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  color: #eb2e79;
  font-weight: 700;
}

.reply-profile-date {
  font-size: 22px;
  margin-bottom: 4px;
}

.reply-profile-title,
.reply-profile-sub {
  font-size: 22px;
  line-height: 1.2;
}

.reply-profile-counts {
  margin-top: auto;
  color: #111;
  font-size: 20px;
  font-weight: 700;
}

.reply-profile-counts strong {
  color: #eb2e79;
}

.reply-board-card {
  padding: 24px;
}

.reply-board-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 16px;
}

.reply-board-title {
  font-size: 24px;
  font-weight: 700;
  color: #111;
}

.reply-board-url {
  font-size: 18px;
  font-weight: 700;
  color: #111;
}

.reply-write-box {
  display: flex;
  gap: 18px;
  background: #f5f5f5;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 22px;
}

.reply-write-icon-wrap {
  width: 128px;
  flex-shrink: 0;
}

.reply-write-icon {
  width: 100%;
  display: block;
}

.reply-write-form {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.reply-notice {
  font-size: 14px;
  line-height: 1.5;
  color: #666;
  margin-bottom: 12px;
}

.reply-input {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid #a8a8a8;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  padding: 12px 14px;
}

.reply-nickname-input {
  margin-bottom: 10px;
  height: 44px;
}

.reply-message-input {
  min-height: 120px;
  resize: none;
}

.reply-write-bottom {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reply-char-count {
  font-size: 14px;
  color: #666;
}

.reply-submit-btn,
.reply-delete-btn,
.reply-close-btn {
  border: 1.5px solid #7f7f7f;
  background: #fff;
  border-radius: 10px;
  padding: 8px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.reply-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.reply-item {
  background: #f5f5f5;
  border-radius: 12px;
  padding: 14px;
}

.reply-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
  color: #222;
}

.reply-item-date {
  color: #444;
  font-weight: 600;
}

.reply-item-body {
  display: flex;
  gap: 18px;
}

.reply-item-icon-wrap {
  width: 108px;
  flex-shrink: 0;
}

.reply-item-icon {
  width: 100%;
  display: block;
}

.reply-item-message {
  flex: 1;
  min-height: 110px;
  border: 1.5px solid #a8a8a8;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  box-sizing: border-box;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 18px;
  color: #222;
}

.reply-item-actions {
  margin-left: auto;
}

.reply-submit-btn,
.reply-close-btn {
  font-size: 14px;
  font-weight: 700;
  color: #222;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


@media (max-width: 768px) {
  .reply-shell {
    padding: 28px 16px 36px;
  }

  .reply-frame {
    padding: 18px;
    border-radius: 28px;
    transform: scale(0.9);
    transform-origin: top center;
  }

  .reply-top-card {
    flex-direction: column;
    gap: 16px;
    padding: 18px;
  }

  .reply-profile-photo-wrap {
    width: 100%;
    max-width: 320px;
  }

  .reply-profile-date,
  .reply-profile-title,
  .reply-profile-sub {
    font-size: 18px;
  }

  .reply-profile-counts {
    margin-top: 16px;
    font-size: 16px;
  }

  .reply-board-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .reply-board-title {
    font-size: 20px;
  }

  .reply-board-url {
    font-size: 14px;
  }

  .reply-write-box,
  .reply-item-body {
    flex-direction: column;
  }

  .reply-write-icon-wrap,
  .reply-item-icon-wrap {
    width: 120px;
  }

  .reply-message-input {
    min-height: 100px;
  }

  .reply-item-message {
    min-height: 90px;
    font-size: 16px;
  }
}



html,
body {
  touch-action: manipulation;
}

* {
  -webkit-tap-highlight-color: transparent;
}

img,
picture {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}