:root {
  --black: #111;
  --gray-900: #222;
  --gray-700: #555;
  --gray-500: #8a8a8a;
  --gray-350: #c8c8c8;
  --gray-250: #dedede;
  --gray-150: #f0f0f0;
  --gray-100: #f7f7f7;
  --white: #fff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", sans-serif;
  line-height: 1.45;
}

button {
  font: inherit;
  color: var(--gray-900);
  background: var(--gray-100);
  border: 1px solid var(--gray-500);
  border-radius: 4px;
  padding: 9px 10px;
  text-align: left;
}

.page-header {
  max-width: 1220px;
  margin: 0 auto;
  padding: 38px 24px 22px;
  border-bottom: 1px solid var(--gray-350);
}

.label {
  margin: 0 0 8px;
  color: var(--gray-700);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -.045em;
}

.subtitle {
  max-width: 820px;
  margin: 14px 0 0;
  color: var(--gray-700);
  font-size: 17px;
}

.principles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.version-hub {
  margin-top: 22px;
  padding: 18px;
  border: 2px solid var(--gray-900);
  border-radius: 16px;
  background: var(--gray-100);
}

.version-head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -.03em;
}

.version-head p:last-child {
  margin: 8px 0 0;
  color: var(--gray-700);
}

.version-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.version-card {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border: 2px solid var(--gray-900);
  border-radius: 14px;
  background: var(--white);
  color: var(--black);
  text-decoration: none;
}

.version-card small {
  color: var(--gray-700);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 800;
}

.version-card b {
  display: block;
  font-size: 22px;
  letter-spacing: -.03em;
}

.version-card span {
  color: var(--gray-700);
  font-size: 14px;
}

.version-card em {
  align-self: flex-start;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
}

.version-card.active {
  box-shadow: 6px 6px 0 var(--gray-350);
}

.version-card.pending {
  opacity: .48;
}

.principles span,
.chips span,
.reward-row span,
.tabs span,
.steps span,
.bottom-nav span {
  border: 1px solid var(--gray-500);
  background: var(--white);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--gray-700);
  font-size: 12px;
}

.wireframes {
  max-width: 1220px;
  margin: 0 auto;
  padding: 30px 24px 64px;
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 34px 24px;
}

.frame h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.frame h2 span {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid var(--gray-700);
  border-radius: 50%;
  color: var(--gray-700);
  font-size: 13px;
  flex: 0 0 auto;
}

.phone {
  min-height: 620px;
  border: 2px solid var(--gray-900);
  border-radius: 18px;
  background: var(--white);
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 34px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-350);
  margin-bottom: 14px;
}

.topbar b { font-size: 17px; }
.topbar em { font-style: normal; color: var(--gray-500); font-size: 12px; }

.box,
.hero-box,
.video,
.trend-grid article {
  border: 1px solid var(--gray-500);
  background: var(--white);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
}

.hero-box,
.box.tall,
.video,
.trend-grid article:nth-child(odd) {
  background: var(--gray-100);
}

.hero-box small,
.box small {
  display: block;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.hero-box strong,
.box strong {
  display: block;
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: -.04em;
  margin-bottom: 8px;
}

.box p,
.hero-box p,
.trend-grid p {
  margin: 6px 0 0;
  color: var(--gray-700);
  font-size: 13px;
}


.blog-select {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 10px;
}
.blog-select button {
  text-align: left;
  padding: 8px 10px;
  font-size: 12px;
}
.blog-select button.active {
  background: var(--gray-900);
  color: var(--white);
}
.hashtag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--gray-350);
}
.hashtag-row span {
  border: 1px solid var(--gray-500);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--gray-700);
  font-size: 11px;
}
.trend-blog {
  border: 1px solid var(--gray-500);
  border-radius: 6px;
  background: var(--white);
  padding: 10px;
  margin-bottom: 10px;
}
.blog-hero,
.blog-image {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--gray-500);
  background: var(--gray-100);
  display: grid;
  place-items: center;
  color: var(--gray-700);
  font-size: 12px;
  margin-bottom: 9px;
}
.blog-image {
  margin-top: 10px;
}
.trend-blog h3 {
  margin: 0 0 5px;
  font-size: 15px;
  line-height: 1.25;
}
.trend-blog p {
  margin: 0;
  color: var(--gray-700);
  font-size: 12px;
  line-height: 1.55;
}

.box button { width: 100%; margin-top: 8px; }
.box.muted { color: var(--gray-700); background: var(--gray-100); }
.box.compact { min-height: 78px; }
.box.compact b { font-size: 18px; margin: 0; }
.box-title { color: var(--black) !important; font-weight: 700; }
.center { text-align: center; }

.primary {
  width: 100%;
  display: block;
  background: var(--gray-900);
  color: var(--white);
  border-color: var(--gray-900);
  text-align: center;
  font-weight: 700;
  margin-top: 2px;
}


.timer-box {
  border: 1px solid var(--gray-500);
  background: var(--gray-100);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
}
.timer-box small {
  display: block;
  color: var(--gray-700);
  margin-bottom: 8px;
}
.timer-face {
  width: 118px;
  height: 118px;
  margin: 4px auto 10px;
  position: relative;
  display: grid;
  place-items: center;
}
.timer-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.timer-bg,
.timer-progress {
  fill: none;
  stroke-width: 14;
}
.timer-bg {
  stroke: #dedede;
}
.timer-progress {
  stroke: #2f9e44;
  stroke-dasharray: 251.3 314.2;
  stroke-dashoffset: 0;
  transform: rotate(-90deg);
  transform-origin: 60px 60px;
  stroke-linecap: butt;
}
.timer-face.timer-red .timer-progress {
  stroke: #d40000;
  stroke-dasharray: 314.2 314.2;
}
.timer-label {
  position: relative;
  z-index: 1;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: var(--white);
  display: grid;
  place-items: center;
  border: 1px solid var(--gray-700);
}
.timer-label strong {
  display: block;
  font-size: 32px;
  line-height: 1;
  margin-top: 12px;
}
.timer-label span {
  display: block;
  font-size: 12px;
  margin-top: -26px;
  color: var(--gray-700);
}
.timer-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: baseline;
}
.timer-summary p {
  margin: 0;
  color: var(--gray-700);
  font-size: 13px;
}
.timer-summary b { color: var(--black); font-size: 18px; }
.over,
.danger-text {
  color: #d40000 !important;
  font-weight: 800;
}
.safe,
.safe-text {
  color: #2f9e44 !important;
  font-weight: 800;
}
.timer-track {
  height: 10px;
  border: 1px solid var(--gray-500);
  border-radius: 999px;
  background: var(--white);
  overflow: hidden;
  margin-top: 10px;
}
.timer-track i {
  display: block;
  height: 100%;
  background: var(--gray-700);
}
.timer-track i.safe-fill {
  background: #2f9e44;
}
.timer-track i.over-fill {
  background: #d40000;
}
.usage-graph-box { padding-bottom: 10px; }
.stack-chart {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 6px;
  height: 160px;
  margin-top: 8px;
}
.y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  color: var(--gray-700);
  font-size: 11px;
  padding: 0 0 18px;
}
.bars-area {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  align-items: end;
  border-left: 1px solid var(--gray-700);
  border-bottom: 1px solid var(--gray-700);
  padding: 0 4px 18px 6px;
}
.grid-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gray-350);
  pointer-events: none;
}
.grid-line.top { top: 0; }
.grid-line.mid { top: 50%; }
.stack-col {
  position: relative;
  display: flex;
  flex-direction: column-reverse;
  align-items: stretch;
  justify-content: flex-start;
  height: 122px;
  border-radius: 10px 10px 0 0;
  overflow: visible;
}
.stack-col::after {
  content: attr(data-time);
  position: absolute;
  left: 50%;
  bottom: -20px;
  transform: translateX(-50%);
  color: var(--gray-700);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.stack-col i { display: block; min-height: 5px; }
.stack-col.today { outline: 2px solid #d40000; outline-offset: 2px; }
.insta { background: #ff8ad8; }
.youtube { background: #ff1f1f; }
.tiktok { background: #111; }
.legend {
  display: flex;
  justify-content: center;
  gap: 12px;
  color: var(--gray-700);
  font-size: 12px;
  margin-top: 8px;
}
.legend span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  vertical-align: 0;
}
.insta-dot::before { background: #ff8ad8; }
.youtube-dot::before { background: #ff1f1f; }
.tiktok-dot::before { background: #111; }

.dashboard-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  align-items: center;
}

.ring {
  width: 88px;
  height: 88px;
  border: 9px solid var(--gray-350);
  outline: 1px solid var(--gray-700);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--white);
}
.ring strong { font-size: 25px; margin: 8px 0 -8px; }
.ring span { color: var(--gray-700); font-size: 12px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.stat-grid.two { grid-template-columns: 1fr 1fr; }

.line {
  height: 10px;
  border: 1px solid var(--gray-500);
  background: linear-gradient(90deg, var(--gray-700) var(--fill), transparent 0);
  border-radius: 999px;
  margin: 8px 0;
}
.w35 { --fill: 35%; }
.w45 { --fill: 45%; }
.w55 { --fill: 55%; }
.w60 { --fill: 60%; }
.w80 { --fill: 80%; }

.media-row {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: center;
}
.media-row i {
  width: 58px;
  height: 42px;
  border: 1px solid var(--gray-500);
  background: var(--gray-150);
  display: block;
}
.media-row span { display: block; color: var(--gray-700); font-size: 12px; }

.tabs,
.steps,
.chips,
.reward-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.chart {
  height: 116px;
  border: 1px solid var(--gray-500);
  border-radius: 6px;
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 12px;
  margin-bottom: 10px;
}
.chart i {
  flex: 1;
  display: block;
  background: var(--gray-250);
  border: 1px solid var(--gray-700);
}
.bar-chart { background: var(--white); }

.center-section {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.center-section .line-usage-chart {
  text-align: left;
}
.ai-insight {
  line-height: 1.6;
}

.line-usage-chart {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 6px;
  height: 158px;
  margin-top: 8px;
}
.line-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  color: var(--gray-700);
  font-size: 11px;
  padding: 0 0 22px;
}
.line-plot {
  position: relative;
  border-left: 1px solid var(--gray-700);
  border-bottom: 1px solid var(--gray-700);
  padding-bottom: 22px;
}
.line-plot svg {
  position: absolute;
  inset: 4px 8px 24px 8px;
  width: calc(100% - 16px);
  height: calc(100% - 28px);
  overflow: visible;
}
.line-plot polyline {
  fill: none;
  stroke: var(--gray-900);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.line-plot circle {
  fill: var(--white);
  stroke: var(--gray-900);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}
.time-labels {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  color: var(--gray-700);
  font-size: 10px;
  font-weight: 700;
}

.list,
.settings {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  border: 1px solid var(--gray-500);
  border-radius: 6px;
  overflow: hidden;
}
.list li,
.settings li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--gray-350);
}
.settings li { grid-template-columns: 1fr auto; }
.list li:last-child,
.settings li:last-child { border-bottom: 0; }
.list i {
  width: 22px;
  height: 22px;
  border: 1px solid var(--gray-500);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 12px;
}
.list span,
.settings span { color: var(--gray-700); font-size: 12px; text-align: right; }


.room-title {
  margin: 0 0 8px !important;
  color: var(--black) !important;
}

.room-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.room-card,
.room-add {
  aspect-ratio: 1 / 1;
  width: 100%;
  min-height: 0;
  border: 1px solid var(--gray-500);
  border-radius: 6px;
  background: var(--white);
  padding: 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.room-card.active { background: var(--gray-100); border-color: var(--gray-900); }
a.room-card,
a.room-add {
  color: inherit;
  text-decoration: none;
}
.link-note {
  text-align: center;
  font-size: 12px;
  padding: 8px;
}
.room-card small,
.room-card span {
  display: block;
  color: var(--gray-700);
  font-size: 11px;
}
.room-card b {
  display: block;
  margin: 5px 0;
  font-size: 14px;
  line-height: 1.2;
}
.room-add {
  color: var(--gray-700);
  border-style: dashed;
  background: var(--gray-100);
  font-size: 24px;
  gap: 5px;
}
.room-add span { display: block; font-size: 12px; }

.grid2,
.trend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.grid2 button { min-height: 54px; text-align: center; }

.mascot {
  width: 58px;
  height: 58px;
  margin: 0 auto 10px;
  border: 2px solid var(--gray-700);
  border-radius: 50%;
  color: transparent;
  background: radial-gradient(circle, var(--gray-250) 0 38%, transparent 39%);
}

.video {
  height: 112px;
  display: grid;
  place-items: center;
  color: var(--gray-700);
}
.video.large { height: 170px; }

.theme-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.theme-tabs button {
  text-align: center;
  padding: 8px 4px;
  font-size: 12px;
}
.theme-tabs button.active {
  background: var(--gray-900);
  color: var(--white);
}
.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}
.content-card {
  border: 1px solid var(--gray-500);
  border-radius: 6px;
  background: var(--white);
  padding: 8px;
}
.content-card .thumb {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  border: 1px solid var(--gray-500);
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 12px;
  margin-bottom: 7px;
}
.content-card b,
.content-card span {
  display: block;
  font-size: 12px;
}
.content-card span {
  color: var(--gray-700);
  margin-top: 3px;
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.stepper button {
  width: 34px;
  height: 34px;
  padding: 0;
  text-align: center;
}
.stepper strong { margin: 0; }

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--gray-350);
}
.bottom-nav span {
  padding: 6px 2px;
  border-radius: 4px;
  text-align: center;
  font-size: 11px;
}

.note {
  margin: 10px 0 0;
  color: var(--gray-700);
  font-size: 13px;
}

@media (max-width: 1100px) {
  .wireframes { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
  .version-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .page-header { padding: 28px 18px 18px; }
  .wireframes { grid-template-columns: 1fr; padding: 24px 18px 48px; }
  .phone { min-height: 580px; }
}

/* Compact screen 2 so ratio, weekly bars, hourly line, and AI insight are visible together. */
#screen-analysis .phone {
  padding: 14px;
}
#screen-analysis .box {
  padding: 10px;
  margin-bottom: 8px;
}
#screen-analysis .box p {
  margin-top: 4px;
}
#screen-analysis .line {
  height: 8px;
  margin: 5px 0;
}
#screen-analysis .weekly-graph .stack-chart {
  height: 118px;
  margin-top: 4px;
}
#screen-analysis .weekly-graph .y-axis {
  padding-bottom: 16px;
}
#screen-analysis .weekly-graph .bars-area {
  padding-bottom: 16px;
}
#screen-analysis .weekly-graph .stack-col {
  height: 78px;
}
#screen-analysis .legend {
  margin-top: 4px;
}
#screen-analysis .line-usage-chart {
  width: 100%;
  height: 110px;
  margin-top: 4px;
}
#screen-analysis .line-y-axis {
  padding-bottom: 18px;
}
#screen-analysis .line-plot svg {
  inset: 4px 8px 20px 8px;
  height: calc(100% - 24px);
}
#screen-analysis .ai-insight {
  padding: 9px 10px;
}
#screen-analysis .weekly-graph .stack-col.today {
  outline: 2px solid #d40000;
  outline-offset: 2px;
  border-radius: 0;
}

#screen-analysis .center-section {
  width: 100%;
  align-self: stretch;
}
#screen-analysis .analysis-graph {
  width: 100%;
}
#screen-analysis .line-usage-chart {
  max-width: none;
}

.blog-select-large button {
  display: grid;
  gap: 4px;
}
.blog-select-large b,
.blog-select-large span {
  display: block;
}
.blog-select-large span {
  color: var(--gray-700);
  font-size: 11px;
}
.blog-select-large button.active span {
  color: var(--gray-150);
}
.profile-card,
.reward-card {
  border: 1px solid var(--gray-500);
  border-radius: 6px;
  background: var(--white);
  padding: 12px;
  margin-bottom: 10px;
}
.profile-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
}
.profile-image {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--gray-500);
  background: var(--gray-100);
  display: grid;
  place-items: center;
  color: var(--gray-700);
  font-size: 12px;
}
.profile-card b,
.profile-card span,
.reward-card small,
.reward-card strong,
.reward-card p {
  display: block;
}
.profile-card span,
.reward-card p,
.reward-card small {
  color: var(--gray-700);
  font-size: 12px;
}
.reward-card strong {
  font-size: 32px;
  line-height: 1.1;
  margin: 4px 0;
}

/* Trend selection and reading refinements */
.blog-select-large {
  max-height: 470px;
  overflow-y: auto;
  padding-right: 4px;
}
.blog-option {
  display: grid;
  gap: 6px;
  text-align: left;
}
.preview-img {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--gray-500);
  background: var(--gray-100);
  display: grid;
  place-items: center;
  color: var(--gray-700);
  font-size: 12px;
}
.blog-option.active .preview-img {
  border-color: var(--white);
  background: var(--gray-700);
  color: var(--white);
}
.reading-blog {
  border: 0;
  padding: 0;
  background: transparent;
}
.reading-blog .blog-hero,
.reading-blog .blog-image {
  background: var(--gray-100);
}


.ranking li {
  padding: 0;
}
.rank-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 12px;
  color: inherit;
  text-decoration: none;
}
.rank-link i {
  width: 22px;
  height: 22px;
  border: 1px solid var(--gray-500);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 12px;
}
.rank-link span {
  color: var(--gray-700);
  font-size: 12px;
  text-align: right;
}
.wake-profile .profile-image {
  font-size: 11px;
  text-align: center;
  padding: 4px;
}
