/* StarWrite 앱 홈 화면 공용 컴포넌트 — 원본: Mobile App/screens/home-guide-area-v6.html (G1·G2·F2 상태)
   토큰은 starwrite docs/design/tokens.json sRGB 변환값. 화면 배경은 투명 — 페이지 우주가 프레임 안으로 이어진다. */
/* Pretendard Variable v1.3.9 — KS X 1001 한글 2350자 + 라틴·문장부호 서브셋(pyftsubset). 외부 CDN 대신 자체 호스팅(#534) */
@font-face { font-family: "Pretendard Variable"; src: url("fonts/PretendardVariable.woff2") format("woff2"); font-weight: 45 920; font-display: swap; }
@font-face { font-family: "MaruBuri"; src: url("fonts/MaruBuri-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "MaruBuri"; src: url("fonts/MaruBuri-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Literata"; src: url("fonts/literata-latin-var.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }

.sw-phone {
  --sw-bg: #00020C; --sw-surface: #000C1B; --sw-fg: #F2EBD8; --sw-muted: #A09882; --sw-accent: #D2B46A;
  --sw-border: rgba(242, 235, 216, 0.16); --sw-bubble-border: rgba(242, 235, 216, 0.09);
  --sw-icon-bg: rgba(0, 12, 27, 0.62); --sw-composer-bg: rgba(0, 12, 27, 0.94); --sw-turn-me: rgba(242, 235, 216, 0.09);
  --sw-send-bg: #002733; --sw-send-border: rgba(210, 180, 106, 0.38);
  --sw-body: "Pretendard Variable", "Pretendard", -apple-system, "Apple SD Gothic Neo", system-ui, sans-serif;
  --sw-display: "Literata", "MaruBuri", Georgia, serif;
  --sw-hangul-display: "Literata", "MaruBuri", serif;
  --sw-mono: ui-monospace, "SF Mono", Menlo, monospace;
  /* 화면 틴트 — 0이면 완전 투명(페이지 우주가 그대로 보임) */
  --sw-screen-tint: 0;
  position: relative; width: 390px; height: 844px; flex: none;
  border-radius: 56px; color: var(--sw-fg); font-family: var(--sw-body); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; text-align: left;
}
/* 베젤 — 채움 없는 얇은 고리 두 겹. 화면은 투명이라 바깥 우주가 끊김 없이 들어온다 */
.sw-phone::before { content: ""; position: absolute; inset: -11px; border-radius: 66px; border: 1px solid rgba(242, 235, 216, 0.14); box-shadow: inset 0 0 0 10px rgba(0, 2, 12, 0.55), inset 0 0 0 11px rgba(242, 235, 216, 0.06); pointer-events: none; }
.sw-phone::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: color-mix(in oklab, var(--sw-bg) calc(var(--sw-screen-tint) * 100%), transparent); pointer-events: none; z-index: 0; }
.sw-phone > * { position: relative; z-index: 1; }
.sw-phone .sw-screen { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; display: flex; flex-direction: column; }

/* iOS 상태바 — 앱 배경과 같은 평면(흰 면 없음) */
.sw-status { height: 54px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 6px 34px 0 46px; box-sizing: border-box; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.sw-status .isl { position: absolute; left: 50%; top: 11px; width: 124px; height: 36px; margin-left: -62px; border-radius: 20px; background: #000; }
.sw-status .ic { display: flex; gap: 6px; align-items: center; }
.sw-status .ic svg { height: 12px; fill: var(--sw-fg); }
.sw-home-ind { height: 30px; flex: none; display: grid; place-items: center; }
.sw-home-ind::before { content: ""; width: 134px; height: 5px; border-radius: 3px; background: var(--sw-fg); opacity: .9; margin-top: 4px; }

.sw-topbar { height: 56px; flex: none; padding: 7px 18px 3px; box-sizing: border-box; display: flex; align-items: center; gap: 7px; }
.sw-title { flex: 1; min-width: 0; font-family: var(--sw-mono); font-size: 10px; letter-spacing: .08em; color: var(--sw-muted); opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-title b { font-weight: 400; color: var(--sw-fg); }
.sw-ibtn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; background: var(--sw-icon-bg); border: 1px solid var(--sw-border); color: var(--sw-fg); border-radius: 15px 18px 16px 17px; box-sizing: border-box; position: relative; }
.sw-ibtn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.sw-head { font-family: var(--sw-hangul-display); font-weight: 300; font-size: 27px; line-height: 1.3; letter-spacing: -0.035em; color: var(--sw-fg); }
.sw-head .m { color: var(--sw-muted); }
.sw-foot { margin-top: 10px; font-family: var(--sw-mono); font-size: 10.5px; letter-spacing: .1em; color: var(--sw-muted); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.sw-foot b { color: var(--sw-fg); font-weight: 400; }
.sw-foot.hot { color: var(--sw-fg); }
.sw-foot .q { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--sw-border); font-family: var(--sw-body); font-size: 10px; letter-spacing: 0; color: var(--sw-fg); }

/* 기록 브라우저 / 하루 카드 */
.sw-day { display: grid; gap: 8px; }
.sw-day .meta { padding: 0 6px; font-family: var(--sw-mono); font-size: 10px; letter-spacing: .08em; color: var(--sw-muted); display: flex; align-items: center; justify-content: space-between; gap: 7px; min-height: 18px; }
.sw-day .meta .l { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.sw-day .meta .d { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.sw-day .meta .nav { display: flex; gap: 14px; align-items: center; }
.sw-day .meta .nav svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sw-day .meta .nav .off { opacity: .3; }
.sw-day .txt { padding: 2px 6px 4px; font-family: var(--sw-hangul-display); font-weight: 400; font-size: 19px; line-height: 1.45; letter-spacing: -0.02em; color: var(--sw-fg); }
.sw-day .first { position: relative; background: var(--sw-turn-me); border: 1px solid var(--sw-bubble-border); border-radius: 17px 15px 6px 18px; padding: 13px 50px 13px 18px; font-family: var(--sw-hangul-display); font-size: 13.5px; line-height: 1.5; }
.sw-day .tog { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; display: grid; place-items: center; background: rgba(242,235,216,.08); border: 1px solid rgba(242,235,216,.14); border-radius: 50%; }
.sw-day .tog svg { width: 16px; height: 16px; stroke: var(--sw-fg); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transform: rotate(180deg); }

/* 컴포저 */
.sw-chips { display: flex; gap: 8px; overflow: hidden; }
.sw-chip { flex: none; padding: 9px 12px; font-size: 13px; color: var(--sw-fg); background: var(--sw-icon-bg); border: 1px solid var(--sw-border); border-radius: 13px 16px 14px 15px; white-space: nowrap; }
.sw-composer { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; background: var(--sw-composer-bg); border: 1px solid var(--sw-border); border-radius: 19px 21px 17px 20px; box-shadow: 0 10px 30px rgba(0,0,0,.35); min-height: 60px; box-sizing: border-box; }
.sw-composer .ph { flex: 1; min-width: 0; color: var(--sw-muted); font-size: 15px; }
.sw-composer .ph.typed { color: var(--sw-fg); }
.sw-composer .ph .caret { display: inline-block; width: 1.5px; height: 1.1em; background: var(--sw-accent); vertical-align: -2px; margin-left: 1px; animation: sw-caret 1s steps(1) infinite; }
@keyframes sw-caret { 50% { opacity: 0; } }
.sw-composer .send { width: 44px; height: 44px; flex: none; border-radius: 15px 18px 16px 17px; background: var(--sw-send-bg); border: 1px solid var(--sw-send-border); display: grid; place-items: center; box-sizing: border-box; }
.sw-composer .send svg { width: 18px; height: 18px; stroke: var(--sw-fg); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (prefers-reduced-motion: reduce) {
  .sw-composer .ph .caret { animation: none; }
}
