/* Loaded by app.js from GitHub Pages over the inline style of the installed index.html.
   Chromium 79 (webOS 6): no flexbox gap, so spacing comes from margins and grid-column-gap.
   Sizes inside the cards are in em: app.js gives each card group the largest font-size at which it fits. */
@font-face { font-family: Inter; font-weight: 400; src: url(fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 700; src: url(fonts/inter-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 800; src: url(fonts/inter-latin-800-normal.woff2) format('woff2'); }

:root {
  --bg: #121212;
  --card: #3c3c3c;
  --text: #fff;
  --soft: rgba(255, 255, 255, 0.78);
  /* The drafts' #8b2a1f has 1.3:1 contrast on the dark cards. */
  --accent: #e1847a;
  --error: #ff6b6b;
  --line: rgba(255, 255, 255, 0.09);
}

.theme-light {
  --bg: #eaeaea;
  --card: #dcdcdc;
  --text: #000;
  --soft: rgba(0, 0, 0, 0.75);
  --accent: #8b2a1f;
  --error: #b3261e;
  --line: rgba(0, 0, 0, 0.1);
}

html, body { height: 100%; }

/* Geometry and type scale measured on the drafts at 1920x1080. Card text is in em of the detail size, which app.js fits. */
body {
  box-sizing: border-box;
  margin: 0;
  padding: 51px 85px 45px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.47 Inter, sans-serif;
}

/* The webOS 24 simulator injects `* { font-family: "LG Display-Regular"; font-weight: 400 !important; }` into the app:
   `body *` outranks `*` for the family, and every weight other than 400 below needs !important. */
body * { font-family: Inter, sans-serif; }

#today { margin: 0 0 33px; font-size: 62px; line-height: 1; font-weight: 800 !important; color: var(--accent); }

main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: minmax(0, 1fr);
  grid-column-gap: 56px;
}

main > section { min-height: 0; padding: 0; display: flex; flex-direction: column; }

.card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 54px 47px 45px;
  border-radius: 40px;
  background: var(--card);
}
.card + .card { margin-top: 8px; }
.card h2 { flex: none; margin: 0 0 10px; font-size: 41px; line-height: 1.1; font-weight: 700 !important; }
/* Equal slots with the content centred: a row keeps its place whether or not it has details, and app.js fits the text
   to the fullest slot. The row's children must not shrink, or a full slot would squash them instead of overflowing. */
.card ul { flex: 1; min-height: 0; display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.card li { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; justify-content: center; padding: 0.2em 0; }
.card li + li { border-top: 2px solid var(--line); }
.card li > * { flex: none; }

.icon, .state { width: 1.15em; height: 1.15em; vertical-align: -0.2em; }
.accent, .week-start { color: var(--accent); }
.week-start { display: inline-block; font-size: 28px; font-weight: 700 !important; white-space: nowrap; }
.count { display: inline-block; font-size: 24px; font-weight: 400; color: var(--soft); white-space: nowrap; }

.who { font-size: 1.627em; line-height: 1.15; font-weight: 700 !important; }
.time { font-weight: 400; color: var(--soft); }
.detail { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--soft); }
.meal .detail { padding-left: 2.3em; }
.meal .unknown .who { font-weight: 400 !important; color: var(--soft); }

.week li { flex-direction: row; align-items: center; font-size: 1.373em; line-height: 1.2; }
.week .area { flex: 1; }
.week .who { margin-left: 0.6em; font-size: 1em; white-space: nowrap; }
.week .none { font-weight: 400 !important; font-style: italic; color: var(--soft); }

footer { left: 85px; right: 85px; bottom: 12px; display: flex; font: 16px/1.2 Inter, sans-serif; color: var(--soft); white-space: nowrap; }
footer div { overflow: hidden; text-overflow: ellipsis; margin-right: 32px; }
/* Only the update time and the error lines stay (app.js marks the style line as an error when Inter is not in use);
   without style.css the shell shows every line. */
footer #screensaver, footer #source, footer #style:not(.error) { display: none; }
.error { color: var(--error); }
