*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #000;
  --surface: #111;
  --border:  #222;
  --text:    #fff;
  --text2:   #bbb;
  --text3:   #777;
  --hs:      #f97316;
  --btn-bg:  #1a1a1a;
  --btn-br:  #333;

  --col-uk:   #3b82f6;
  --col-world:#10b981;
  --col-op:   #a78bfa;
  --col-ideas:#c084fc;
  --col-sci:  #06b6d4;
  --col-biz:  #f59e0b;
  --col-cult: #f97316;
  --col-sport:#ef4444;
  --col-ent:  #ec4899;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  height: 100%; overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

/* ── Screens ──────────────────────────────────────────────────── */
.screen {
  display: none;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.screen.active { display: flex; }

/* ── Tap to start overlay ─────────────────────────────────────── */
#tap-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: #000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 24px; cursor: pointer;
}
#tap-overlay.hidden { display: none; }

.hs-icon-xl {
  width: 96px; height: 96px; border-radius: 22px;
  background: var(--hs);
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; font-weight: 900; color: #fff; letter-spacing: -1px;
}
.tap-title { font-size: 36px; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.tap-sub   { font-size: 18px; color: #888; font-weight: 400; }
.tap-prompt {
  margin-top: 20px;
  font-size: 20px; color: #555;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:0.4} 50%{opacity:1} }

/* ── Home screen ──────────────────────────────────────────────── */
#screen-home {
  padding: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.home-header {
  padding: 20px 20px 12px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.hs-icon-sm {
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--hs);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900; color: #fff; letter-spacing: -0.5px; flex-shrink: 0;
}
.home-titles { display: flex; flex-direction: column; }
.home-name { font-size: 18px; font-weight: 800; color: #fff; letter-spacing: -0.3px; }
.home-sub  { font-size: 12px; color: #555; font-weight: 500; }

#btn-morning {
  display: block; width: calc(100% - 32px); margin: 16px 16px 8px;
  background: #1a0e00; border: 1px solid #f97316;
  color: #f97316; padding: 18px 20px; border-radius: 12px;
  font-size: 20px; font-weight: 700; cursor: pointer;
  font-family: inherit; text-align: left;
  transition: background 0.12s;
  letter-spacing: -0.3px;
}
#btn-morning:hover, #btn-morning:active { background: #2a1600; }

#section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 8px 16px 32px;
}

.section-btn {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--col);
  border-radius: 10px; padding: 18px 14px;
  cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; gap: 4px;
  text-align: left; transition: background 0.12s;
  min-height: 80px;
}
.section-btn:hover, .section-btn:active { background: #1a1a1a; }
.section-btn-name  { font-size: 17px; font-weight: 700; color: #fff; line-height: 1.2; }
.section-btn-count { font-size: 12px; color: #555; margin-top: 2px; }

/* ── Reading screen ───────────────────────────────────────────── */
.reading-header {
  padding: 14px 16px 12px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.nav-link {
  background: none; border: none; color: var(--text3);
  font-size: 15px; cursor: pointer; font-family: inherit;
  padding: 4px 0; transition: color 0.12s;
}
.nav-link:hover { color: var(--text2); }
#section-label   { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--section-col, #fff); }
#article-counter { font-size: 13px; color: var(--text3); }

.reading-body {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 20px 16px;
  display: flex; flex-direction: column; gap: 16px;
}

#source-name {
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text3);
}
#article-headline {
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 800; color: #fff;
  line-height: 1.25; letter-spacing: -0.5px;
}
#summary-label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: #444; margin-bottom: 6px;
}
#summary-text {
  font-size: clamp(17px, 4vw, 22px);
  color: #ccc; line-height: 1.6;
}
#verdict-block {
  font-size: clamp(15px, 3.5vw, 18px);
  color: #777; border-left: 3px solid #222;
  padding-left: 12px; line-height: 1.5;
}
#badges-block { display: flex; gap: 8px; flex-wrap: wrap; }

.rd-badge {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px;
}
.rd-partial { background: #2d1600; color: #fb923c; }
.rd-suppress-notice {
  font-size: 18px; color: #b45454;
  background: #180808; border: 1px solid #3a1515;
  border-radius: 10px; padding: 16px; line-height: 1.5;
}
.rd-essay-text { font-size: clamp(17px, 4vw, 22px); color: #c4b5fd; line-height: 1.6; }

#status-bar {
  text-align: center; font-size: 14px;
  color: #444; padding: 8px 16px;
  flex-shrink: 0;
}

/* ── Article screen ───────────────────────────────────────────── */
.article-body {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px; display: flex; flex-direction: column; gap: 16px;
}
#art-headline { font-size: clamp(20px, 4.5vw, 28px); font-weight: 800; color: #fff; line-height: 1.3; letter-spacing: -0.3px; }
#art-summary-box { background: #111; border: 1px solid #222; border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
#art-summary-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: #444; }
#art-summary-text { font-size: 17px; color: #ccc; line-height: 1.6; }
.article-divider {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px;
  color: #333; display: flex; align-items: center; gap: 10px;
}
.article-divider::before, .article-divider::after { content: ''; flex: 1; height: 1px; background: #222; }
#art-body { font-size: clamp(16px, 4vw, 20px); color: #bbb; line-height: 1.85; white-space: pre-wrap; }
#art-source-label { font-size: 13px; color: #555; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Two-finger section picker overlay ────────────────────────── */
#picker-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.92);
  display: none;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
}
#picker-overlay.visible { display: flex; }
.pick-item {
  font-size: 17px; color: #555; font-weight: 600;
  padding: 5px 24px; border-radius: 24px;
}
.pick-item.on {
  font-size: 23px; color: #fff; font-weight: 800;
  background: #0e2a1e; border: 1.5px solid #10b981;
}
