/*
  웹 문서 틀의 스타일. `index.html` 이 head 에서 싣는다.
  ⚠️ index.html 에 인라인으로 되돌리지 않는다. 헬스체크가 응답 앞 5120바이트에서 앱 번들 태그를 찾는데(scripts/check-health-marker.mjs),
     export 는 그 태그를 body 끝에 넣어 head 가 커질수록 뒤로 밀린다.
*/
/* The `react-native-web` recommended style reset: https://necolas.github.io/react-native-web/docs/setup/#root-element */
/* These styles make the body full-height */
html,
body {
  height: 100%;
}
/*
  문서 바탕을 앱 바탕색으로 칠한다. 칠하지 않으면 브라우저 기본값인 흰색이다.
  iOS 에서 키보드가 올라오면 앱 화면이 덮지 못한 자리로 이 바탕이 비친다.
  iOS 26 Chrome 은 자동 완성 막대 뒤가 투명해 입력창과 키보드 사이에 흰 띠로 보였다.
  --color-bg 는 ThemeProvider 가 :root 에 모드별로 적는다. 그래서 라이트·다크를 같이 따라간다.
*/
html,
body {
  background-color: var(--color-bg);
}
/* global CSS 의 :root 는 라이트 값이라 JS 전에는 흰 바탕이다. 기본 테마(다크)로 먼저 칠한다. ThemeProvider 의 인라인 값이 이어받는다(TNG-4666). */
html:root {
  --color-bg: #212121;
  --color-surface: #2f2f2f;
}
/* 어두운 바탕 토큰을 paint() 로 한 번 더 칠한다. 삼성 인터넷 어두운 보기가 background-color 를 바꿔도 이것은 두기 때문이다(solid-paint.js).
  밝은 바탕(bg-accent)은 넣지 않는다. 삼성이 그 위 어두운 글자를 밝게 뒤집어 글자가 사라진다. */
html,
body,
.bg-bg,
.bg-sidebar,
.bg-bg-elevated,
.bg-surface,
.bg-surface-hover,
.bg-composer,
.bg-bubble-user {
  background-image: paint(tting-solid);
}
html, body, .bg-bg { --tting-solid: var(--color-bg); }
.bg-sidebar { --tting-solid: var(--color-sidebar); }
.bg-bg-elevated { --tting-solid: var(--color-bg-elevated); }
.bg-surface { --tting-solid: var(--color-surface); }
.bg-surface-hover { --tting-solid: var(--color-surface-hover); }
.bg-composer { --tting-solid: var(--color-composer); }
.bg-bubble-user { --tting-solid: var(--color-bubble-user); }
/* 진행 막대 채움은 표지 클래스로 켠다. 색 클래스에 바로 걸면 아이콘을 얹은 체크박스·점까지 번진다(TNG-3767). */
.tting-solid-fill.bg-positive { background-image: paint(tting-solid); --tting-solid: var(--color-positive); }
.tting-solid-fill.bg-status-waiting { background-image: paint(tting-solid); --tting-solid: var(--color-status-waiting); }
.tting-solid-fill.bg-danger { background-image: paint(tting-solid); --tting-solid: var(--color-danger); }
/* 눌린 바탕도 paint() 로 칠한다. 바탕 그림이 :active 의 background-color 를 덮어 눌림이 안 보이고, 삼성은 그 색을 바꾼다. */
.active\:bg-surface:active,
.active\:bg-surface-hover:active {
  background-image: paint(tting-solid);
}
.active\:bg-surface:active { --tting-solid: var(--color-surface); }
.active\:bg-surface-hover:active { --tting-solid: var(--color-surface-hover); }
/* 테두리가 있으면 삼성은 paint() 바탕도 절반 밝기로 누른다(투명한 1px 이어도). 테두리 없는 ::before 에 칠한다(TNG-3768).
  RN Web 의 View 는 이미 position: relative 라 위치를 따로 주지 않는다. */
:is(.bg-bg, .bg-sidebar, .bg-bg-elevated, .bg-surface, .bg-surface-hover, .bg-composer, .bg-bubble-user):is(.border, [class*="border-["]) {
  isolation: isolate;
  background-image: none;
  background-clip: padding-box;
}
:is(.bg-bg, .bg-sidebar, .bg-bg-elevated, .bg-surface, .bg-surface-hover, .bg-composer, .bg-bubble-user):is(.border, [class*="border-["])::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background-image: paint(tting-solid);
  pointer-events: none;
}
/* These styles disable body scrolling if you are using <ScrollView> */
body {
  overflow: hidden;
}
/* These styles make the root element full-height */
#root {
  display: flex;
  height: 100%;
  flex: 1;
}
/* JS 전 자리표시. early-fetch.js 가 상세 주소에서만 data-early-route 를 단다. #root 밖에 두어 상세 화면이 그려질 때 앱이 걷는다(TNG-4700). */
.sk {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-color: var(--color-bg);
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  box-sizing: border-box;
}
[data-early-route] .sk {
  display: flex;
}
.sk b {
  display: block;
  height: 14px;
  border-radius: 8px;
  background-color: var(--color-surface);
}
.sk b:nth-child(1) { height: 44px; }
.sk b:nth-child(2) { height: 220px; }
.sk b:nth-child(3) { height: 20px; width: 70%; }
.sk b:nth-child(5) { width: 85%; }
