/* Jarvis – kuchynský displej (tablet na šírku, čítanie z 1–2 m) */
:root {
  --bg: #0b0f17;
  --panel: rgba(255, 255, 255, .055);
  --panel-2: rgba(255, 255, 255, .09);
  --line: rgba(255, 255, 255, .1);
  --text: #eef2f8;
  --muted: #9aa6b8;
  --accent: #4cc9f0;
  --accent-2: #7b61ff;
  --warm: #ffb703;
  --ok: #3ddc97;
  --bad: #ff5d73;
  --top: 64px;
}

html, body { height: 100%; }
body {
  margin: 0; overflow: hidden; color: var(--text); font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 700px at 85% -10%, rgba(123, 97, 255, .16), transparent 60%),
              radial-gradient(900px 600px at -10% 110%, rgba(76, 201, 240, .12), transparent 60%), var(--bg);
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
input, textarea { -webkit-user-select: text; user-select: text; }
[hidden] { display: none !important; }

/* ---------- horná lišta */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 0 18px; background: linear-gradient(to bottom, rgba(11, 15, 23, .92), rgba(11, 15, 23, .6)); backdrop-filter: blur(8px);
}
.status { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 7px 14px; font-size: 15px; white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 0 transparent; flex: none; }
.dot.on { background: var(--ok); animation: breathe 2.4s ease-in-out infinite; }
.dot.warn { background: var(--warm); }
.dot.err { background: var(--bad); }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, .5); } 50% { box-shadow: 0 0 0 7px rgba(61, 220, 151, 0); } }
.timers { display: flex; gap: 8px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.timer-chip { display: flex; align-items: center; gap: 8px; background: rgba(255, 183, 3, .14); border: 1px solid rgba(255, 183, 3, .35); color: #ffd56b;
  border-radius: 999px; padding: 6px 8px 6px 14px; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.timer-chip button { border: 0; background: rgba(255, 255, 255, .1); color: inherit; width: 28px; height: 28px; border-radius: 50%; line-height: 1; }
.timer-chip.done { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { background: rgba(255, 93, 115, .4); } }
.top-clock { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
body.on-idle .top-clock { visibility: hidden; }
.top-actions { display: flex; gap: 6px; }
.ibtn { position: relative; width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  font-size: 21px; display: inline-flex; align-items: center; justify-content: center; transition: background .15s; }
.ibtn:active { background: var(--panel-2); }
.ibtn.big { width: 64px; height: 64px; font-size: 30px; border-radius: 20px; }
.badge-dot { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--accent); color: #04121a;
  font-size: 12px; line-height: 20px; padding: 0 5px; }

/* ---------- obrazovky */
#main { position: absolute; inset: 0; }
.screen { position: absolute; inset: 0; padding-top: var(--top); overflow-y: auto; opacity: 0; visibility: hidden; pointer-events: none; scrollbar-width: thin; }
.screen.active { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .35s; }

/* úvod */
.idle { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10px 24px 120px;
  transition: transform 2s ease, opacity 1s; }
.idle-clock { font-size: clamp(110px, 19vw, 230px); font-weight: 800; letter-spacing: -.04em; line-height: .95; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff, #b9c6da); -webkit-background-clip: text; background-clip: text; color: transparent; }
.idle-date { font-size: clamp(24px, 3.2vw, 38px); color: var(--muted); margin-top: 8px; }
.idle-weather { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; justify-content: center; }
.w-now { display: flex; align-items: center; gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 14px 26px; }
.w-now .ic { font-size: 56px; line-height: 1; }
.w-now .t { font-size: 52px; font-weight: 800; line-height: 1; }
.w-now .d { text-align: left; color: var(--muted); font-size: 18px; line-height: 1.35; }
.w-day { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 12px 20px; min-width: 120px; }
.w-day .n { color: var(--muted); font-size: 16px; text-transform: capitalize; }
.w-day .ic { font-size: 34px; }
.w-day .mm { font-size: 20px; font-weight: 700; }
.w-day .mm span { color: var(--muted); font-weight: 500; }
.w-day .r { font-size: 14px; color: var(--accent); }
.idle-hint { margin-top: 34px; font-size: 21px; color: var(--muted); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.idle-hint b { color: var(--text); }
.idle-recent { margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; max-width: 1100px; }
.chip-btn { display: inline-flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 999px;
  padding: 6px 16px 6px 6px; font-size: 17px; }
.chip-btn img, .chip-btn .em { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--panel-2); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
body.night #screen-idle { opacity: .45; }
body.night .idle-clock { background: linear-gradient(180deg, #c9d3e3, #7d8aa0); -webkit-background-clip: text; background-clip: text; }

/* recept */
.r-hero { position: relative; height: 42vh; min-height: 280px; overflow: hidden; }
.r-hero-img { position: absolute; inset: 0; background: linear-gradient(135deg, #2b2f6b, #0f3d4f); background-size: cover; background-position: center;
  transform: scale(1.03); transition: opacity .6s; }
.r-hero-img.loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .08) 50%, transparent 70%);
  animation: shimmer 1.6s infinite; }
.r-hero-img .placeholder-emoji { position: absolute; right: 8%; top: 50%; transform: translateY(-50%); font-size: 160px; opacity: .5; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.r-hero-shade { position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 2%, rgba(11, 15, 23, .55) 45%, rgba(11, 15, 23, .15)); }
.r-hero-text { position: absolute; left: 36px; right: 36px; bottom: 22px; }
.r-kicker { color: var(--warm); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 15px; }
.r-hero h1 { font-size: clamp(38px, 5vw, 62px); font-weight: 800; letter-spacing: -.02em; margin: 4px 0 6px; text-shadow: 0 2px 20px rgba(0, 0, 0, .5); }
.r-hero p { font-size: 21px; color: #d6deea; max-width: 900px; margin: 0 0 12px; }
.r-img-note { position: absolute; right: 14px; top: 12px; font-size: 13px; color: rgba(255, 255, 255, .7); background: rgba(0, 0, 0, .35); border-radius: 999px; padding: 3px 10px; }
.r-img-note:empty { display: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; padding: 6px 14px; font-size: 17px; font-weight: 600; backdrop-filter: blur(6px); }
.r-body { display: grid; grid-template-columns: minmax(300px, 34%) 1fr; gap: 26px; padding: 18px 36px 130px; }
.r-body h2 { font-size: 26px; font-weight: 800; margin-bottom: 14px; }
.r-body h2 small { font-size: 17px; color: var(--muted); font-weight: 500; }
.r-ingredients { background: var(--panel); border: 1px solid var(--line); border-radius: 26px; padding: 22px 22px; align-self: start; position: sticky; top: 12px; }
.ing-group + .ing-group { margin-top: 16px; }
.ing-group h3 { font-size: 16px; text-transform: uppercase; letter-spacing: .08em; color: var(--warm); margin: 0 0 6px; }
.ing { display: flex; gap: 12px; align-items: baseline; padding: 9px 2px; border-bottom: 1px dashed var(--line); font-size: 20px; cursor: pointer; }
.ing:last-child { border-bottom: 0; }
.ing .amt { min-width: 92px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.ing .note { display: block; font-size: 15px; color: var(--muted); }
.ing.done { opacity: .38; text-decoration: line-through; }
.r-steps ol { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.step { position: relative; display: flex; gap: 18px; padding: 18px 20px; border-radius: 22px; border: 1px solid transparent; transition: background .3s, border-color .3s, opacity .3s; cursor: pointer; }
.step + .step { margin-top: 6px; }
.step .num { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--panel-2); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; }
.step .txt { font-size: 22px; line-height: 1.5; }
.step .tbtn { margin-top: 10px; border: 1px solid rgba(255, 183, 3, .45); background: rgba(255, 183, 3, .12); color: #ffd56b; border-radius: 999px; padding: 5px 14px; font-size: 17px; font-weight: 600; }
.step.active { background: linear-gradient(135deg, rgba(76, 201, 240, .14), rgba(123, 97, 255, .12)); border-color: rgba(76, 201, 240, .45); }
.step.active .num { background: var(--accent); color: #04121a; }
.step.active .txt { font-size: 26px; }
.step.past { opacity: .55; }
.r-tips { margin-top: 22px; display: grid; gap: 10px; }
.tip { background: rgba(255, 183, 3, .08); border: 1px solid rgba(255, 183, 3, .25); border-radius: 18px; padding: 12px 16px; font-size: 18px; }
.tip::before { content: "💡 "; }
.r-source { margin-top: 18px; color: var(--muted); font-size: 15px; }
.step-nav { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: none; align-items: center; gap: 16px; z-index: 15;
  background: rgba(11, 15, 23, .85); border: 1px solid var(--line); border-radius: 28px; padding: 8px; backdrop-filter: blur(10px); font-size: 19px; font-weight: 700; }
body.on-recipe .step-nav { display: flex; }
#stepLabel { min-width: 130px; text-align: center; font-variant-numeric: tabular-nums; }

/* časovače na celý displej */
.t-wrap { min-height: 100%; display: flex; flex-direction: column; padding: 14px 28px 120px; }
.t-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.t-head h1 { font-size: 34px; font-weight: 800; margin: 0; }
.t-grid { flex: 1; display: grid; gap: 22px; align-items: center; justify-items: center; margin-top: 10px; }
.t-grid.n2 { grid-template-columns: 1fr 1fr; } .t-grid.n3, .t-grid.n4 { grid-template-columns: 1fr 1fr; }
.tcard { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
.tring { position: relative; width: min(64vh, 80vw); aspect-ratio: 1; }
.t-grid.n2 .tring { width: min(52vh, 40vw); } .t-grid.n3 .tring, .t-grid.n4 .tring { width: min(30vh, 34vw); }
.tring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tring circle { fill: none; stroke-width: 7; }
.tring .bg { stroke: rgba(255, 255, 255, .08); }
.tring .fg { stroke: var(--warm); stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.tin { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.tlabel { font-size: clamp(20px, 3vw, 34px); color: #ffd56b; font-weight: 700; max-width: 80%; }
.ttime { font-size: clamp(56px, 13vh, 150px); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.t-grid.n3 .ttime, .t-grid.n4 .ttime { font-size: clamp(36px, 7vh, 70px); }
.tend { font-size: clamp(15px, 2vh, 21px); color: var(--muted); }
.tbtns { display: flex; gap: 12px; }
.tbtns .btn { font-size: 20px; padding: 10px 26px; }
.tcard.done .ttime { color: var(--bad); animation: blink 1s steps(2) infinite; }
.tcard.done .fg { stroke: var(--bad); }

/* stránka (HTML od Jarvisa) */
#screen-page { overflow: hidden; }
#pageFrame { border: 0; width: 100%; height: 100%; display: block; background: transparent; }

/* odpoveď */
.answer { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 60px 120px; }
.answer-emoji { font-size: 110px; line-height: 1; margin-bottom: 16px; }
.answer h1 { font-size: clamp(42px, 6vw, 76px); font-weight: 800; letter-spacing: -.02em; max-width: 1100px; }
.answer p { font-size: 27px; color: #cfd8e6; max-width: 950px; margin-top: 10px; }
.facts { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 24px; }
.fact { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 14px 22px; min-width: 160px; }
.fact .l { color: var(--muted); font-size: 16px; }
.fact .v { font-size: 26px; font-weight: 700; }

/* nákupný zoznam */
.list-wrap, .hist-wrap { max-width: 980px; margin: 0 auto; padding: 24px 28px 130px; }
.list-wrap h1, .hist-wrap h1 { font-size: 38px; font-weight: 800; margin-bottom: 18px; }
.list-add { display: flex; gap: 10px; margin-bottom: 18px; }
.list-add .form-control { background: var(--panel); border-color: var(--line); font-size: 21px; }
.shop { list-style: none; padding: 0; margin: 0 0 18px; }
.shop li { display: flex; align-items: center; gap: 16px; padding: 14px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 8px; font-size: 23px; }
.shop li .cb { width: 34px; height: 34px; border-radius: 10px; border: 2px solid var(--muted); flex: none; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #04121a; }
.shop li.done { opacity: .45; text-decoration: line-through; }
.shop li.done .cb { background: var(--ok); border-color: var(--ok); }
.shop li .nm { flex: 1; }
.shop li .del { border: 0; background: transparent; color: var(--muted); font-size: 22px; }
.empty { color: var(--muted); font-size: 20px; }

/* história */
.hist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.hist-card { border: 1px solid var(--line); background: var(--panel); border-radius: 22px; overflow: hidden; color: var(--text); text-align: left; padding: 0; }
.hist-card .im { height: 130px; background: linear-gradient(135deg, #2b2f6b, #0f3d4f) center/cover; display: flex; align-items: center; justify-content: center; font-size: 54px; }
.hist-card .tt { padding: 12px 14px; font-size: 18px; font-weight: 600; }
.hist-card .tm { padding: 0 14px 12px; color: var(--muted); font-size: 14px; }

/* obľúbené */
.r-fav { position: absolute; right: 24px; bottom: 24px; width: 64px; height: 64px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(0, 0, 0, .35); color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(6px); z-index: 2; }
.r-fav.on { color: #ff5d73; border-color: rgba(255, 93, 115, .6); background: rgba(255, 93, 115, .15); }
.fav-tips { background: linear-gradient(135deg, rgba(76, 201, 240, .12), rgba(123, 97, 255, .12)); border: 1px solid rgba(76, 201, 240, .35); border-radius: 24px; padding: 18px 20px; margin-bottom: 18px; }
.fav-tips h2 { font-size: 24px; font-weight: 800; margin-bottom: 10px; }
.fav-tip-list { display: grid; gap: 10px; }
.fav-tip { display: flex; gap: 14px; align-items: center; background: rgba(0, 0, 0, .2); border-radius: 18px; padding: 10px 12px; text-align: left; border: 0; color: var(--text); width: 100%; }
.fav-tip .im { width: 72px; height: 72px; border-radius: 14px; flex: none; background: linear-gradient(135deg, #2b2f6b, #0f3d4f) center/cover; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.fav-tip .nm { font-size: 22px; font-weight: 700; } .fav-tip .rs { font-size: 17px; color: #cfd8e6; }
.hist-card { position: relative; }
.hist-card .x { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .5); color: #fff; font-size: 16px; }
.hist-card .tm.ask { color: var(--accent); }

/* ---------- počúvanie */
.listen { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding: 40px;
  background: radial-gradient(circle at 50% 42%, rgba(76, 201, 240, .18), rgba(11, 15, 23, .94) 55%); backdrop-filter: blur(10px); }
.listen-title { font-size: 40px; font-weight: 800; }
.listen-transcript { font-size: 30px; max-width: 1000px; color: #e9f6ff; min-height: 1em; }
.listen-transcript:not(:empty)::before { content: "„"; } .listen-transcript:not(:empty)::after { content: "“"; }
.listen-stage { font-size: 21px; color: var(--accent); min-height: 1.4em; }
.orb { position: relative; display: inline-block; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #bff0ff, var(--accent) 35%, var(--accent-2) 75%);
  box-shadow: 0 0 40px rgba(76, 201, 240, .45); flex: none; }
.orb span { position: absolute; inset: -12%; border-radius: 50%; border: 2px solid rgba(76, 201, 240, .45); animation: ring 2.2s ease-out infinite; }
.orb-sm { width: 22px; height: 22px; } .orb-lg { width: 120px; height: 120px; } .orb-xl { width: 170px; height: 170px; transition: transform .08s linear; }
@keyframes ring { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.45); opacity: 0; } }
.listen.thinking .orb-xl { animation: think 1.4s ease-in-out infinite; }
@keyframes think { 0%, 100% { filter: hue-rotate(0deg); transform: scale(.92); } 50% { filter: hue-rotate(40deg); transform: scale(1.02); } }

/* ---------- zvonenie */
.alarm { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
  background: radial-gradient(circle, rgba(255, 93, 115, .35), rgba(11, 15, 23, .96) 60%); animation: pulsebg 1s ease-in-out infinite; }
.alarm-icon { font-size: 120px; color: #ffd56b; animation: shake .5s ease-in-out infinite; }
.alarm h1 { font-size: 64px; font-weight: 800; } .alarm p { font-size: 26px; color: #ffd6dc; }
@keyframes shake { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg); } }
@keyframes pulsebg { 50% { background-color: rgba(255, 93, 115, .12); } }

/* ---------- štart, toast, mikrofón */
.start { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; background: var(--bg); padding: 30px; }
.start h1 { font-size: 64px; font-weight: 800; margin: 10px 0 0; } .start p { font-size: 22px; color: var(--muted); max-width: 700px; }
.toast-box { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); z-index: 45; background: rgba(20, 26, 38, .95); border: 1px solid var(--line); border-radius: 20px;
  padding: 14px 22px; font-size: 20px; max-width: min(90vw, 900px); box-shadow: 0 10px 40px rgba(0, 0, 0, .4); }
.mic-fab { position: fixed; right: 26px; bottom: 26px; z-index: 30; width: 78px; height: 78px; border-radius: 50%; border: 0; color: #04121a; font-size: 34px;
  background: radial-gradient(circle at 35% 30%, #c9f3ff, var(--accent) 60%); box-shadow: 0 10px 34px rgba(76, 201, 240, .35); }
.mic-fab:active { transform: scale(.95); }
.meter { position: relative; height: 16px; border-radius: 8px; background: var(--panel-2); overflow: hidden; }
.meter-bar { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--accent), var(--ok)); transition: width .08s; }
.meter-mark { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--warm); }
.diag { white-space: pre-wrap; font-size: 14px; color: #c8d3e3; background: rgba(0, 0, 0, .25); border-radius: 12px; padding: 10px 12px; }
.modal-content { background: #131a26; border: 1px solid var(--line); border-radius: 22px; }

/* tlačidlo Stíšiť počas reči Jarvisa */
.hush { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); z-index: 46; border: 0; border-radius: 999px; padding: 14px 30px;
  font-size: 22px; font-weight: 700; color: #04121a; background: #fff; box-shadow: 0 10px 34px rgba(0, 0, 0, .45); }
body.on-recipe .hush { bottom: 108px; }
.say-hint { color: var(--muted); font-size: .85em; }

/* ---------- na výšku / menšie displeje */
@media (max-width: 900px), (orientation: portrait) {
  .r-body { grid-template-columns: 1fr; padding: 16px 18px 130px; }
  .r-ingredients { position: static; }
  .r-hero-text { left: 18px; right: 18px; }
  .top-clock { display: none; }
}
@media (max-width: 760px) {
  /* šípky krokov vľavo, aby ich neprekrylo tlačidlo mikrofónu */
  .step-nav { left: 14px; transform: none; bottom: 18px; gap: 8px; }
  #stepLabel { min-width: 96px; font-size: 16px; }
  .ibtn.big { width: 56px; height: 56px; }
  .mic-fab { right: 16px; bottom: 16px; width: 70px; height: 70px; }
}
@media (max-width: 600px) {
  .status #statusText { display: none; }
  .ibtn { width: 40px; height: 40px; font-size: 18px; }
}
