@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css');

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

:root {
  --bg: #ffffff;
  --bg-2: #f6f6f6;
  --bg-3: #ebebeb;
  --text-1: #111111;
  --text-2: #555555;
  --text-3: #aaaaaa;
  --border: #eeeeee;
  --black: #111111;
  --white: #ffffff;
  --header-h: 56px;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #d8d8d8;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.app {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* ── Header ── */
.header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);

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

.header-title {
  font-size: 17px;
  font-weight: 700;
  flex: 1;
  letter-spacing: -0.3px;
}

.header-sub {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 400;
}

.btn-back {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-1);
  border-radius: 50%;
  transition: background 0.15s;
  flex-shrink: 0;
  margin-left: -8px;
  margin-right: 4px;
}

.btn-back:active {
  background: var(--bg-3);
}

.btn-back svg {
  width: 20px;
  height: 20px;
}

/* ── Detail panel slide-in ── */
.panel {
  position: absolute;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 150;
  overflow: hidden;
}

.panel.open {
  transform: translateX(0);
}

/* ── Scroll ── */
.scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; }

/* ── Status Bar (iPhone Dynamic Island) ── */
.status-bar {
  height: 54px;
  display: flex;
  align-items: center;       /* 시간·아이콘 수직 중앙 정렬 */
  padding: 10px 34px 0;      /* 상단 오프셋으로 아일랜드와 높이 맞춤 */
  position: relative;
  flex-shrink: 0;
  color: var(--text-1);
  user-select: none;
  -webkit-user-select: none;
  background: var(--bg);
}

.status-bar.dark {
  color: #ffffff;
  background: transparent;
}

.sb-time {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.3px;
  flex: 1;
  line-height: 1;
}

/* 다이나믹 아일랜드: 시간·아이콘과 수평으로만 겹치지 않고
   좌(시간)·우(아이콘) 사이 중앙에 위치하여 겹침 없음           */
.sb-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 34px;
  background: #000;
  border-radius: 20px;
}

.sb-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

/* ── Bottom home bar ── */
.bottom-home-bar {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0 calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
}

.btn-home {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--bg-3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10), inset 0 1px 2px rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-2);
  transition: box-shadow 0.15s, transform 0.1s;
}

.btn-home:active {
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), inset 0 2px 4px rgba(0,0,0,0.08);
  transform: scale(0.94);
}

/* ── 실제 모바일: 핸드폰 흉내 UI 숨김 ── */
@media (max-width: 430px) {
  .status-bar,
  .bottom-home-bar {
    display: none;
  }
}

/* ── Desktop hint ── */
@media (min-width: 431px) {
  body {
    padding: 32px 0 48px;
    align-items: flex-start;
  }

  .app {
    min-height: 812px;
    border-radius: 44px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
    border: 1px solid #ccc;
  }
}
