/* Family frame. Designed on an 80rem x 50rem canvas (1280x800 at 16px); app.js scales rem to fit the screen.
   Plain flexbox and no CSS variables, so it also runs on old Android WebViews.

   Look: a film-grade teal-black with one warm amber moment (the "next up" card), condensed numerals
   for things read from across the room, and a serif italic for the human lines (weather note, verse). */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #0c181a; overflow: hidden; }
body {
  color: #e8f0ee;
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  -webkit-user-select: none; user-select: none;
  touch-action: manipulation;
}
p, h1, h2 { margin: 0; }
button, input { font-family: inherit; }

#app {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column;
  padding: 1.6rem 1.9rem 0;
  transition: opacity .6s;
}
.main { flex: 1; display: flex; min-height: 0; }
.left { width: 43rem; margin-right: 2rem; display: flex; flex-direction: column; min-height: 0; }
.right { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }

/* ---------- next-up card ---------- */
.hero {
  height: 11rem; flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 1.7rem;
  border-radius: 1.2rem;
  background: #e9a23b; color: #1b1304;
}
.hero-text { flex: 1; min-width: 0; padding-right: 1.2rem; }
.hero-kicker { font-size: 1.05rem; font-weight: 600; opacity: .72; margin-bottom: .35rem; display: flex; align-items: center; }
.hero-tag { display: inline-block; margin-left: .7rem; padding: .08rem .6rem .1rem; border-radius: 1rem; background: rgba(27,19,4,.14); font-size: .9rem; font-weight: 600; }
.hero-title {
  font: 700 2.7rem/1.04 "Roboto Condensed", "sans-serif-condensed", "Arial Narrow", sans-serif;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-sub { font-size: 1.15rem; margin-top: .5rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-count { text-align: right; flex: none; }
.hero-big { font: 700 5.6rem/.9 "Roboto Condensed", "sans-serif-condensed", "Arial Narrow", sans-serif; letter-spacing: -.02em; }
.hero-big.small { font-size: 3.6rem; }
.hero-unit { font-size: 1.2rem; font-weight: 600; margin-top: .3rem; opacity: .8; }

.hero.now { background: #5fc4b5; }
.hero.hero-empty { background: #132226; color: #e8f0ee; border: 1px solid #24424a; }
.hero.hero-empty .hero-title {
  font: italic 400 2.3rem/1.15 Georgia, "Noto Serif", "Droid Serif", serif;
}
.hero.hero-empty .hero-kicker { color: #86a29e; opacity: 1; }
.hero.hero-empty .hero-sub { opacity: 1; color: #b9cdc9; }

/* ---------- countdown chips ---------- */
.chips { flex: none; margin-top: .9rem; min-height: 0; }
.chips:empty { display: none; }
.chip {
  display: inline-block; margin: 0 .6rem .1rem 0; padding: .4rem 1rem;
  border-radius: 2rem; border: 1px solid #2b5560; background: #153037;
  font-size: 1.05rem; white-space: nowrap;
}
.chip b { font-weight: 700; margin-right: .5rem; }
.chip span { color: #e9a23b; font-weight: 600; }

/* ---------- agenda ---------- */
.agenda { flex: 1; display: flex; margin-top: 1.2rem; min-height: 0; overflow: hidden; }
.col { flex: 1; min-width: 0; }
.col + .col { margin-left: 1.5rem; }
.col h2 {
  font: italic 400 1.35rem/1 Georgia, "Noto Serif", "Droid Serif", serif;
  color: #86a29e; padding-bottom: .55rem; margin-bottom: .8rem; border-bottom: 1px solid #24424a;
}
.ev { display: flex; margin-bottom: .8rem; }
.ev-bar { width: .3rem; border-radius: .2rem; margin-right: .8rem; flex: none; background: #86a29e; }
.ev-body { min-width: 0; }
.ev-time { font-size: 1rem; color: #86a29e; font-variant-numeric: tabular-nums; margin-bottom: .1rem; }
.ev-title {
  font-size: 1.25rem; font-weight: 600; line-height: 1.2;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.more { color: #86a29e; font-size: 1rem; margin: .1rem 0 0 1.1rem; }
.empty { color: #86a29e; font: italic 400 1.15rem/1.3 Georgia, "Noto Serif", "Droid Serif", serif; }
.legend { flex: none; padding: .5rem 0 .9rem; font-size: .95rem; color: #86a29e; min-height: 2.1rem; }
.legend i { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin: 0 .4rem 0 0; vertical-align: baseline; }
.legend span { margin-right: 1.3rem; }

/* ---------- clock ---------- */
.clock { flex: none; }
.time-row { white-space: nowrap; }
.time {
  font: 700 8.6rem/.92 "Roboto Condensed", "sans-serif-condensed", "Arial Narrow", sans-serif;
  letter-spacing: -.025em; font-variant-numeric: tabular-nums;
}
.ampm { font-size: 2rem; font-weight: 600; color: #86a29e; margin-left: .7rem; }
.date { font-size: 1.5rem; margin-top: .35rem; color: #cddcd9; }
.sync { font-size: .95rem; color: #ef7b6a; min-height: 1.2rem; margin-top: .2rem; }

/* ---------- weather ---------- */
.weather { flex: none; margin-top: .7rem; padding: 1.1rem 1.3rem 1rem; border-radius: 1.1rem; background: #132226; }
.wx-now { display: flex; align-items: center; }
.wx-icon { font-size: 3.4rem; line-height: 1; width: 4.4rem; }
.wx-temp { font: 700 4.4rem/1 "Roboto Condensed", "sans-serif-condensed", "Arial Narrow", sans-serif; margin-right: 1.1rem; }
.wx-desc { font-size: 1.3rem; font-weight: 600; }
.wx-range { font-size: 1.05rem; color: #86a29e; margin-top: .15rem; }
.wx-line { font: italic 400 1.25rem/1.3 Georgia, "Noto Serif", "Droid Serif", serif; margin-top: .7rem; color: #e8f0ee; }
.wx-hours { display: flex; margin-top: .9rem; padding-top: .8rem; border-top: 1px solid #24424a; }
.wx-h { flex: 1; text-align: center; }
.wx-h .h { font-size: .95rem; color: #86a29e; }
.wx-h .i { font-size: 1.5rem; line-height: 1.5; }
.wx-h .t { font-size: 1.15rem; font-weight: 600; }
.wx-h .p { font-size: .85rem; color: #5fc4b5; min-height: 1.1rem; }

/* ---------- dinner + shopping ---------- */
.cards { flex: 1; display: flex; margin-top: .9rem; margin-bottom: 1rem; min-height: 0; }
.card { flex: 1; min-width: 0; padding: 1rem 1.2rem; border-radius: 1.1rem; background: #132226; overflow: hidden; }
.card + .card { margin-left: .9rem; }
.card-tap:active { background: #183036; }
.card-head { font-size: 1.05rem; color: #86a29e; margin-bottom: .55rem; }
.shop-count { color: #5fc4b5; font-weight: 700; margin-left: .35rem; }
.dinner-text { font-size: 1.75rem; font-weight: 600; line-height: 1.15; }
.shop-preview div { font-size: 1.15rem; margin-bottom: .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-preview .more { margin-left: 0; }

/* ---------- verse ---------- */
.verse { flex: none; height: 5.3rem; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #24424a; }
.verse-text { flex: 1; font: italic 400 1.4rem/1.3 Georgia, "Noto Serif", "Droid Serif", serif; color: #d7e4e1; padding-right: 2rem; }
.verse-text.long { font-size: 1.15rem; }
.verse-ref { flex: none; font-size: 1.05rem; color: #86a29e; }

/* ---------- overlays ---------- */
.overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #0a1315; z-index: 20; display: none; padding: 1.8rem 2.2rem; }
.overlay.open { display: block; }
.ov-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.ov-bar h1 { font: italic 400 2.2rem/1 Georgia, "Noto Serif", "Droid Serif", serif; }
.btn {
  border: 1px solid #2b5560; background: #153037; color: #e8f0ee; border-radius: .8rem;
  font-size: 1.2rem; padding: .7rem 1.4rem; margin-left: .7rem;
}
.btn:active { background: #1d4550; }
.btn-main { background: #e9a23b; border-color: #e9a23b; color: #1b1304; font-weight: 700; }
.btn-main:active { background: #f4b960; }
.add-row { display: flex; margin-bottom: 1rem; }
.add-row input {
  flex: 1; font-size: 1.4rem; padding: .7rem 1rem; border-radius: .8rem;
  border: 1px solid #2b5560; background: #0f1d20; color: #e8f0ee; -webkit-user-select: text; user-select: text;
}
.shop-list { position: absolute; top: 10rem; left: 2.2rem; right: 2.2rem; bottom: 1.2rem; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.shop-row { display: flex; align-items: center; padding: .75rem .2rem; border-bottom: 1px solid #1b333a; font-size: 1.6rem; }
.shop-row .box { width: 2rem; height: 2rem; border: 2px solid #5fc4b5; border-radius: 50%; margin-right: 1.1rem; flex: none; }
.shop-row.done { color: #627c78; text-decoration: line-through; }
.shop-row.done .box { background: #5fc4b5; border-color: #5fc4b5; }
.pin { background: rgba(10,19,21,.98); }
.pin-box { width: 22rem; margin: 2rem auto 0; text-align: center; }
.pin-box h1 { font: italic 400 1.6rem/1.2 Georgia, "Noto Serif", "Droid Serif", serif; margin-bottom: 1rem; }
.pin-dots { height: 2.2rem; font-size: 2rem; letter-spacing: .6rem; margin-bottom: .8rem; color: #e9a23b; }
.pin-pad { display: flex; flex-wrap: wrap; justify-content: center; margin-bottom: 1rem; }
.pin-pad button { width: 6.2rem; height: 3.6rem; margin: .3rem; border-radius: .8rem; border: 1px solid #2b5560; background: #153037; color: #e8f0ee; font-size: 1.8rem; }
.pin-pad button:active { background: #1d4550; }
.pin-pad .ok { background: #e9a23b; color: #1b1304; border-color: #e9a23b; font-weight: 700; }
.pin-box .btn { margin: 0; }

.toast {
  position: fixed; left: 50%; bottom: 6.8rem; z-index: 40; max-width: 40rem;
  -webkit-transform: translateX(-50%); transform: translateX(-50%);
  background: #ef7b6a; color: #230d09; font-size: 1.2rem; font-weight: 600; padding: .7rem 1.4rem; border-radius: 2rem;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.toast.show { opacity: 1; }

/* ---------- photo slideshow ---------- */
.photos { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #000; z-index: 30; display: none; }
body.mode-photo .photos { display: block; }
.photo-layer { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s; }
.slide.on { opacity: 1; }
.slide.cover { object-fit: cover; }
.slide.contain { object-fit: contain; }
.photo-caption, .photo-clock {
  position: absolute; bottom: 1.4rem; font-size: 1.5rem; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.9);
}
.photo-caption { left: 2rem; font-style: italic; }
.photo-clock { right: 2rem; font-weight: 600; }

/* ---------- night view ---------- */
.night { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #040809; z-index: 25; display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
body.mode-night .night { display: flex; }
body.mode-night #app { display: none; }
.night-time { font: 700 15rem/1 "Roboto Condensed", "sans-serif-condensed", "Arial Narrow", sans-serif; color: #3f625f; letter-spacing: -.02em; }
.night-date { font-size: 1.8rem; color: #2f4a48; margin-top: .4rem; }
.night-verse { max-width: 52rem; margin-top: 2.2rem; font: italic 400 1.4rem/1.4 Georgia, "Noto Serif", "Droid Serif", serif; color: #2b4341; }
body.awake #app { opacity: .6; }

/* ---------- verse as a feature footer (chosen "t3" look) ---------- */
.verse { height: 8.4rem; flex-direction: column; justify-content: center; text-align: center; border-top: none; position: relative; }
.verse:before { content: ""; position: absolute; top: .4rem; left: 50%; width: 3.5rem; margin-left: -1.75rem; height: 2px; background: #e9a23b; }
.verse-text { flex: none; padding: 0 1rem; font-size: 1.75rem; line-height: 1.25; color: #efe6d6; }
.verse-text.long { font-size: 1.5rem; }
.verse-ref { margin-top: .5rem; color: #e9a23b; letter-spacing: .2em; text-transform: uppercase; font-size: .95rem; font-weight: 600; }
