/* iPad 2 Hub — visual.
 * Compatível com Safari 9: sem CSS grid e sem variáveis; flexbox e filtros com prefixo -webkit-.
 * Navegadores modernos ganham o desfoque de vidro; os antigos ficam com o fundo translúcido.
 */
* { -webkit-box-sizing: border-box; box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #0b1020; color: #f4f6fb; overflow: hidden; }
body {
  font-family: -apple-system, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; color: inherit; cursor: pointer; }

/* ================= Céu (fundo que muda com o clima e a hora) ================= */
.sky { position: fixed; top: 0; left: 0; right: 0; bottom: 0; overflow: hidden; -webkit-transition: background 2s; transition: background 2s; }
.sky-sol-dia        { background: #2a73c9; background: -webkit-linear-gradient(-60deg, #1d5fb8 0%, #3d8fe0 45%, #f0a35e 100%); background: linear-gradient(150deg, #1d5fb8 0%, #3d8fe0 45%, #f0a35e 100%); }
.sky-nuvem-sol-dia  { background: #3b6ea8; background: -webkit-linear-gradient(-60deg, #2b5a91 0%, #5b88bb 55%, #c9a37e 100%); background: linear-gradient(150deg, #2b5a91 0%, #5b88bb 55%, #c9a37e 100%); }
.sky-nuvem-dia      { background: #4b5d74; background: -webkit-linear-gradient(-60deg, #34465d 0%, #5d708a 60%, #8593a5 100%); background: linear-gradient(150deg, #34465d 0%, #5d708a 60%, #8593a5 100%); }
.sky-chuva-dia      { background: #2c3a4d; background: -webkit-linear-gradient(-60deg, #1d2838 0%, #34465d 60%, #4f6178 100%); background: linear-gradient(150deg, #1d2838 0%, #34465d 60%, #4f6178 100%); }
.sky-tempestade-dia { background: #1d2230; background: -webkit-linear-gradient(-60deg, #141824 0%, #2a2f45 60%, #463d5e 100%); background: linear-gradient(150deg, #141824 0%, #2a2f45 60%, #463d5e 100%); }
.sky-noite          { background: #0b1020; background: -webkit-linear-gradient(-60deg, #060914 0%, #0f1733 55%, #2a1d47 100%); background: linear-gradient(150deg, #060914 0%, #0f1733 55%, #2a1d47 100%); }
.sky-chuva-noite, .sky-tempestade-noite { background: #080b14; background: -webkit-linear-gradient(-60deg, #05070d 0%, #111827 60%, #1f2937 100%); background: linear-gradient(150deg, #05070d 0%, #111827 60%, #1f2937 100%); }

.orb { position: absolute; border-radius: 50%; opacity: .45; }
.orb-a { width: 520px; height: 520px; top: -160px; right: -120px;
  background: -webkit-radial-gradient(center, circle, rgba(255,214,140,.75) 0%, rgba(255,214,140,0) 70%);
  background: radial-gradient(circle at center, rgba(255,214,140,.75) 0%, rgba(255,214,140,0) 70%);
  -webkit-animation: drift 26s ease-in-out infinite alternate; animation: drift 26s ease-in-out infinite alternate; }
.orb-b { width: 620px; height: 620px; bottom: -260px; left: -200px;
  background: -webkit-radial-gradient(center, circle, rgba(120,170,255,.55) 0%, rgba(120,170,255,0) 70%);
  background: radial-gradient(circle at center, rgba(120,170,255,.55) 0%, rgba(120,170,255,0) 70%);
  -webkit-animation: drift 34s ease-in-out infinite alternate-reverse; animation: drift 34s ease-in-out infinite alternate-reverse; }
.sky-noite .orb-a, .sky-chuva-noite .orb-a, .sky-tempestade-noite .orb-a { opacity: .18; }
.sky-chuva-dia .orb-a, .sky-tempestade-dia .orb-a, .sky-nuvem-dia .orb-a { opacity: .15; }
@-webkit-keyframes drift { from { -webkit-transform: translate3d(0,0,0); } to { -webkit-transform: translate3d(-60px,40px,0); } }
@keyframes drift { from { transform: translate3d(0,0,0); } to { transform: translate3d(-60px,40px,0); } }

.rain { position: absolute; top: -100px; left: 0; right: 0; bottom: 0; opacity: 0; -webkit-transition: opacity 2s; transition: opacity 2s;
  background-image: -webkit-linear-gradient(290deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 96%, rgba(255,255,255,.35) 100%);
  background-image: linear-gradient(160deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 96%, rgba(255,255,255,.35) 100%);
  background-size: 18px 90px;
  -webkit-animation: rain .7s linear infinite; animation: rain .7s linear infinite; }
.rain.on { opacity: .22; }
@-webkit-keyframes rain { from { -webkit-transform: translate3d(0,0,0); } to { -webkit-transform: translate3d(-32px,90px,0); } }
@keyframes rain { from { transform: translate3d(0,0,0); } to { transform: translate3d(-32px,90px,0); } }

/* ================= Estrutura ================= */
#app { position: absolute; top: 0; left: 0; right: 0; bottom: 0; padding: 26px 26px 96px; }
.tab { display: none; height: 100%; }
.tab.active { display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column;
  -webkit-animation: fade .35s ease-out; animation: fade .35s ease-out; }
@-webkit-keyframes fade { from { opacity: 0; -webkit-transform: translate3d(0,8px,0); } to { opacity: 1; -webkit-transform: none; } }
@keyframes fade { from { opacity: 0; transform: translate3d(0,8px,0); } to { opacity: 1; transform: none; } }

.row { display: -webkit-flex; display: flex; }
.row.top { height: 46%; margin-bottom: 18px; }
.row.bottom { -webkit-flex: 1; flex: 1; min-height: 0; }
.row > * { margin-right: 18px; }
.row > *:last-child { margin-right: 0; }

.glass {
  position: relative; overflow: hidden;
  background: rgba(14, 20, 36, .42);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 26px; padding: 20px 22px;
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 18px 40px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.08);
}
.label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.8px; color: rgba(255,255,255,.62); margin-bottom: 12px; }
.label-aside { float: right; letter-spacing: 0; font-weight: 400; text-transform: none; }
.muted { color: rgba(255,255,255,.55); }

/* ================= Relógio ================= */
.hero { -webkit-flex: 1.25; flex: 1.25; display: -webkit-flex; display: flex;
  -webkit-flex-direction: column; flex-direction: column; -webkit-justify-content: center; justify-content: center; padding-left: 6px; }
.greet { font-size: 26px; font-weight: 500; color: rgba(255,255,255,.8); }
.clock { font-size: 148px; font-weight: 200; letter-spacing: -6px; line-height: .95; margin: 4px 0 6px -6px;
  text-shadow: 0 6px 30px rgba(0,0,0,.25); }
.clock .colon { -webkit-animation: blink 2s steps(1) infinite; animation: blink 2s steps(1) infinite; position: relative; top: -10px; padding: 0 2px; }
@-webkit-keyframes blink { 50% { opacity: .35; } }
@keyframes blink { 50% { opacity: .35; } }
.date { font-size: 22px; color: rgba(255,255,255,.78); }
.date:first-letter { text-transform: uppercase; }
.next-event { margin-top: 18px; font-size: 16px; display: none; }
.next-event.on { display: inline-block; }
.next-pill { display: inline-block; padding: 9px 16px; border-radius: 999px; background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.16); }
.next-pill b { font-weight: 600; color: #ffd98a; margin-right: 6px; }

/* ================= Clima ================= */
.weather-card { -webkit-flex: 1; flex: 1; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; }
.weather-now { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; }
.w-icon { width: 104px; height: 104px; margin-right: 18px; -webkit-flex-shrink: 0; flex-shrink: 0; }
.w-icon svg, .wd-i svg { width: 100%; height: 100%; display: block; }
.w-temp { font-size: 76px; font-weight: 200; line-height: 1; letter-spacing: -3px; }
.w-temp sup { font-size: 40px; vertical-align: top; position: relative; top: 6px; }
.w-label { font-size: 19px; margin-top: 4px; }
.w-extra { font-size: 15px; color: rgba(255,255,255,.65); margin: 12px 0 0; }
.w-days { display: -webkit-flex; display: flex; margin-top: auto; padding-top: 14px; }
.w-day { -webkit-flex: 1; flex: 1; text-align: center; padding: 10px 0 9px; border-radius: 16px;
  background: rgba(255,255,255,.08); margin-right: 10px; }
.w-day:last-child { margin-right: 0; }
.w-day.today { background: rgba(255,255,255,.18); }
.wd-d { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.7); }
.wd-i { width: 36px; height: 36px; margin: 4px auto; }
.wd-t { font-size: 15px; }
.wd-t span { color: rgba(255,255,255,.55); }
.wd-r { font-size: 12px; color: #9cc8ff; margin-top: 2px; }

/* ================= Música ================= */
.music-card { -webkit-flex: 1.25; flex: 1.25; padding: 0; }
.m-bg { position: absolute; top: -40px; left: -40px; right: -40px; bottom: -40px; background-size: cover; background-position: center;
  opacity: 0; -webkit-filter: blur(40px) saturate(180%); filter: blur(40px) saturate(180%);
  -webkit-transition: opacity 1s; transition: opacity 1s; }
.m-bg.on { opacity: .55; }
.m-inner { position: relative; padding: 20px 22px; height: 100%; display: -webkit-flex; display: flex;
  -webkit-flex-direction: column; flex-direction: column; }
.m-head { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; }
.m-art { width: 92px; height: 92px; border-radius: 16px; -webkit-flex-shrink: 0; flex-shrink: 0; margin-right: 16px;
  background: rgba(255,255,255,.12) center / cover no-repeat; box-shadow: 0 10px 24px rgba(0,0,0,.35); overflow: hidden; }
.m-art-ph { display: block; width: 100%; height: 100%;
  background: -webkit-linear-gradient(-45deg, #d97757, #7a4bd1); background: linear-gradient(135deg, #d97757, #7a4bd1); }
.m-art.has-art .m-art-ph { display: none; }
.m-meta { min-width: 0; -webkit-flex: 1; flex: 1; }
.m-meta .label { margin-bottom: 6px; }
.m-track { font-size: 21px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-artist { font-size: 15px; color: rgba(255,255,255,.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.m-progress { height: 5px; border-radius: 3px; background: rgba(255,255,255,.18); margin-top: auto; overflow: hidden; }
.m-bar { height: 100%; width: 0; background: #fff; border-radius: 3px; -webkit-transition: width 1s linear; transition: width 1s linear; }
.m-times { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 6px; overflow: hidden; }
.m-times span:last-child { float: right; }
.m-controls { text-align: center; margin-top: 6px; }
.ibtn { -webkit-appearance: none; border: 0; background: transparent; width: 58px; height: 58px; border-radius: 50%;
  margin: 0 10px; vertical-align: middle; padding: 15px; -webkit-transition: -webkit-transform .15s, background .15s; transition: transform .15s, background .15s; }
.ibtn svg { width: 100%; height: 100%; display: block; }
.ibtn.play { width: 70px; height: 70px; background: #fff; color: #111; padding: 21px; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.ibtn:active { -webkit-transform: scale(.9); transform: scale(.9); background: rgba(255,255,255,.15); }
.ibtn.play:active { background: #e6e6e6; }

/* ================= Agenda ================= */
.list-card { -webkit-flex: 1; flex: 1; }
.agenda, .status { list-style: none; }
.agenda li { position: relative; padding: 9px 0 9px 16px; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda li:before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 2px; background: #9cc8ff; }
.agenda li.now:before { background: #ffd98a; }
.agenda li.muted:before { display: none; }
.agenda li.muted { padding-left: 0; }
.agenda .when { display: block; font-size: 13px; color: rgba(255,255,255,.6); margin-bottom: 1px; }
.empty { text-align: center; padding-top: 18px; }
.empty .big { font-size: 40px; display: block; margin-bottom: 6px; }

/* ================= Status ================= */
.status li { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center;
  padding: 10px 12px; margin-bottom: 8px; border-radius: 14px; background: rgba(255,255,255,.07); font-size: 15px; }
.status li.muted { background: transparent; padding: 0; }
.status .nm { -webkit-flex: 1; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status .ms { font-size: 13px; color: rgba(255,255,255,.6); margin-left: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-right: 10px; background: #777; -webkit-flex-shrink: 0; flex-shrink: 0; }
.dot.ok { background: #4ade80; box-shadow: 0 0 0 0 rgba(74,222,128,.6); -webkit-animation: pulse 2.4s infinite; animation: pulse 2.4s infinite; }
.dot.down { background: #ff6b6b; }
.status li.down { background: rgba(255,107,107,.16); }
@-webkit-keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.55); } 70% { box-shadow: 0 0 0 8px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.55); } 70% { box-shadow: 0 0 0 8px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }

/* ================= Dock ================= */
.dock { position: absolute; left: 50%; bottom: 18px; -webkit-transform: translateX(-50%); transform: translateX(-50%);
  padding: 6px; border-radius: 22px; white-space: nowrap;
  background: rgba(14,20,36,.55); border: 1px solid rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 14px 34px rgba(0,0,0,.3); }
.dock-btn { -webkit-appearance: none; border: 0; background: transparent; color: rgba(255,255,255,.7);
  font-size: 15px; font-weight: 500; padding: 10px 18px 10px 14px; border-radius: 16px; vertical-align: middle;
  -webkit-transition: background .2s, color .2s; transition: background .2s, color .2s; }
.dock-btn.active { background: rgba(255,255,255,.92); color: #111827; }
.di { display: inline-block; width: 20px; height: 20px; vertical-align: -4px; margin-right: 8px; }
.di svg { width: 100%; height: 100%; display: block; }
.conn { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0 10px 0 6px; vertical-align: middle; background: #4ade80; }
.conn.off { background: #ff6b6b; -webkit-animation: blink 1s steps(1) infinite; animation: blink 1s steps(1) infinite; }

/* ================= Chat ================= */
.chat-wrap { height: 100%; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; padding: 0; }
.chat-head { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.claude-mark { width: 30px; height: 30px; margin-right: 10px; color: #e8865f; }
.claude-mark svg { width: 100%; height: 100%; display: block; }
.chat-title { font-size: 20px; font-weight: 600; -webkit-flex: 1; flex: 1; }
.chat-log { -webkit-flex: 1; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 18px 20px 8px; -webkit-user-select: text; user-select: text; }
.msg { max-width: 78%; padding: 13px 17px; border-radius: 20px; margin-bottom: 12px; line-height: 1.5; font-size: 17px;
  white-space: pre-wrap; word-wrap: break-word; clear: both;
  -webkit-animation: fade .25s ease-out; animation: fade .25s ease-out; }
.msg.user { float: right; background: #e8865f; color: #fff; border-bottom-right-radius: 6px; }
.msg.assistant { float: left; background: rgba(255,255,255,.12); border-bottom-left-radius: 6px; }
.msg.error { float: left; background: rgba(255,107,107,.2); color: #ffd0d0; }
.msg.thinking { float: left; background: rgba(255,255,255,.08); }
.chat-log:after { content: ""; display: block; clear: both; }
.typing span { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.7); margin: 0 3px;
  -webkit-animation: bounce 1.2s infinite; animation: bounce 1.2s infinite; }
.typing span:nth-child(2) { -webkit-animation-delay: .15s; animation-delay: .15s; }
.typing span:nth-child(3) { -webkit-animation-delay: .3s; animation-delay: .3s; }
@-webkit-keyframes bounce { 0%, 60%, 100% { -webkit-transform: none; opacity: .5; } 30% { -webkit-transform: translateY(-6px); opacity: 1; } }
@keyframes bounce { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-6px); opacity: 1; } }
.welcome { text-align: center; padding: 40px 20px 10px; }
.welcome .claude-mark { width: 56px; height: 56px; margin: 0 auto 12px; display: block; }
.welcome h2 { font-size: 26px; font-weight: 600; margin-bottom: 6px; }
.welcome p { color: rgba(255,255,255,.65); }
.chat-chips { padding: 4px 18px 0; white-space: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.chip { -webkit-appearance: none; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08);
  font-size: 15px; padding: 9px 15px; border-radius: 999px; margin: 0 8px 10px 0; }
.chip:active { background: rgba(255,255,255,.2); }
.chip.ghost { margin: 0; font-size: 14px; }
.chat-input { display: -webkit-flex; display: flex; -webkit-align-items: flex-end; align-items: flex-end; padding: 10px 14px 14px; }
.chat-input textarea {
  -webkit-flex: 1; flex: 1; -webkit-appearance: none; border: 1px solid rgba(255,255,255,.18); border-radius: 22px;
  background: rgba(0,0,0,.25); color: #fff; font-size: 18px; padding: 12px 18px; font-family: inherit; resize: none;
  margin-right: 10px; outline: none; max-height: 140px; -webkit-user-select: text; user-select: text; }
.chat-input textarea:focus { border-color: rgba(232,134,95,.8); }
.send { -webkit-appearance: none; border: 0; width: 48px; height: 48px; border-radius: 50%; background: #e8865f; color: #fff; padding: 13px; }
.send svg { width: 100%; height: 100%; display: block; }
.send[disabled] { opacity: .4; }

/* ================= Casa ================= */
.casa-head { overflow: hidden; margin: 2px 4px 14px; }
.casa-head .big-label { float: left; margin: 6px 0 0; }
.big-label { font-size: 14px; }
.home-summary { float: right; font-size: 14px; color: rgba(255,255,255,.7); }
.home-summary .pill { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.1); margin-left: 6px; }
.home-scroll { -webkit-flex: 1; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; min-height: 0; padding-bottom: 10px; }
.home-group { margin-bottom: 8px; }
.home-group-title { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.6); margin: 4px 4px 10px; }
.home-grid { overflow: hidden; }
.home-btn { float: left; width: 15.3%; margin: 0 1.6% 14px 0; height: 132px; border-radius: 22px; text-align: left; padding: 15px 16px;
  -webkit-appearance: none; border: 1px solid rgba(255,255,255,.14); background: rgba(14,20,36,.42); position: relative;
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); font-size: 16px; font-weight: 600; overflow: hidden;
  -webkit-transition: background .25s, color .25s, -webkit-transform .15s; transition: background .25s, color .25s, transform .15s; }
.home-btn:nth-child(6n) { margin-right: 0; }
.home-btn:active { -webkit-transform: scale(.96); transform: scale(.96); }
.home-btn .hi { display: block; width: 30px; height: 30px; margin-bottom: 22px; color: rgba(255,255,255,.75); }
.home-btn .hi svg { width: 100%; height: 100%; display: block; }
.home-btn .nm { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-btn .st { display: block; font-size: 13px; font-weight: 400; color: rgba(255,255,255,.6); margin-top: 3px; }
.home-btn.on { background: rgba(255,225,160,.94); color: #3a2a06; border-color: rgba(255,225,160,1); }
.home-btn.on .hi { color: #c27c0e; }
.home-btn.on .st { color: rgba(58,42,6,.7); }
.home-btn.off-line { opacity: .45; }
.home-btn.busy:after { content: ""; position: absolute; right: 14px; top: 16px; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; -webkit-animation: spin .8s linear infinite; animation: spin .8s linear infinite; }
@-webkit-keyframes spin { to { -webkit-transform: rotate(360deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
.home-help { line-height: 1.6; font-size: 17px; max-width: 640px; }
.home-help code { background: rgba(255,255,255,.14); padding: 2px 7px; border-radius: 6px; font-size: 15px; }
.toast { position: fixed; left: 50%; top: 22px; -webkit-transform: translateX(-50%); transform: translateX(-50%); z-index: 30;
  background: rgba(255,107,107,.95); color: #fff; padding: 10px 18px; border-radius: 14px; font-size: 15px; display: none; }
.toast.on { display: block; }

/* ================= Câmeras ================= */
.cam-grid { -webkit-flex: 1; flex: 1; min-height: 0; overflow-y: auto; display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap;
  -webkit-align-content: flex-start; align-content: flex-start; margin-right: -14px; }
.cam { position: relative; width: -webkit-calc(33.333% - 14px); width: calc(33.333% - 14px); margin: 0 14px 14px 0; border-radius: 20px; overflow: hidden;
  background: #05070d; border: 1px solid rgba(255,255,255,.12); cursor: pointer; }
.cam:before { content: ""; display: block; padding-top: 56.25%; }
.cam video, .cam .cam-msg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.cam video { -o-object-fit: cover; object-fit: cover; }
.cam .cam-msg { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center;
  color: rgba(255,255,255,.55); font-size: 14px; text-align: center; padding: 10px; }
.cam .cam-name { position: absolute; left: 10px; bottom: 10px; padding: 5px 11px; border-radius: 10px; font-size: 14px; font-weight: 600;
  background: rgba(0,0,0,.5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.cam .live { position: absolute; right: 10px; top: 10px; padding: 3px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; letter-spacing: 1px;
  background: rgba(0,0,0,.5); display: none; }
.cam .live:before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff4d4d; margin-right: 6px; vertical-align: 1px;
  -webkit-animation: blink 1.4s steps(1) infinite; animation: blink 1.4s steps(1) infinite; }
.cam.playing .live { display: block; }
.cam.playing .cam-msg { display: none; }
.cam.offline { opacity: .5; cursor: default; }

.cam-full { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #000; z-index: 20; display: none; }
.cam-full.on { display: block; }
.cam-full-video, .cam-full-video video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.cam-full-video video { -o-object-fit: contain; object-fit: contain; background: #000; }
.cam-full-top { position: absolute; left: 0; right: 0; top: 0; padding: 18px 22px; overflow: hidden;
  background: -webkit-linear-gradient(top, rgba(0,0,0,.6), rgba(0,0,0,0)); background: linear-gradient(rgba(0,0,0,.6), rgba(0,0,0,0)); }
.cam-full-name { font-size: 22px; font-weight: 600; float: left; margin-top: 6px; }
.cam-full-top .chip { float: right; margin: 0; }
.cam-full-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 26px; overflow: hidden;
  background: -webkit-linear-gradient(bottom, rgba(0,0,0,.6), rgba(0,0,0,0)); background: linear-gradient(0deg, rgba(0,0,0,.6), rgba(0,0,0,0)); }
.cam-controls { float: left; margin-top: 46px; }
.cam-controls .chip { font-size: 16px; padding: 11px 18px; }
.cam-controls .chip.on { background: rgba(255,225,160,.95); color: #3a2a06; border-color: transparent; }
.cam-controls .chip.danger.on { background: #ff5c5c; color: #fff; }
.ptz { float: right; position: relative; width: 150px; height: 150px; display: none; }
.ptz.on { display: block; }
.ptz-btn { position: absolute; width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.12);
  -webkit-appearance: none; font-size: 18px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.ptz-btn:active { background: rgba(255,255,255,.35); }
.ptz-btn.up { left: 50px; top: 0; } .ptz-btn.down { left: 50px; bottom: 0; }
.ptz-btn.left { left: 0; top: 50px; } .ptz-btn.right { right: 0; top: 50px; }

/* ================= Modo descanso ================= */
.rest { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #000; z-index: 10; display: none;
  -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center; text-align: center; }
.rest.on { display: -webkit-flex; display: flex; -webkit-animation: fadein 1.2s; animation: fadein 1.2s; }
@-webkit-keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.rest-inner { -webkit-transition: -webkit-transform 3s; transition: transform 3s; }
.rest-clock { font-size: 210px; font-weight: 100; letter-spacing: -8px; line-height: 1; color: #d9dde7; }
.rest.dim .rest-clock { color: #7a3b2a; }
.rest-date { font-size: 26px; color: rgba(255,255,255,.5); margin-top: 8px; }
.rest-date:first-letter { text-transform: uppercase; }
.rest.dim .rest-date, .rest.dim .rest-row { color: rgba(200,110,80,.45); }
.rest-row { margin-top: 26px; font-size: 20px; color: rgba(255,255,255,.55); }
.rest-row span { margin: 0 14px; }
.rest-hint { margin-top: 40px; font-size: 13px; color: rgba(255,255,255,.22); letter-spacing: 1px; text-transform: uppercase; }

/* ================= Retrato (em pé) ================= */
@media (orientation: portrait) {
  #app { padding: 22px 18px 96px; }
  .tab.active { overflow-y: auto; -webkit-overflow-scrolling: touch; display: block; }
  .row.top, .row.bottom { display: block; height: auto; }
  .row > * { margin: 0 0 16px 0; }
  .hero { padding: 10px 6px 4px; }
  .clock { font-size: 130px; }
  .music-card { height: 300px; }
  .home-btn { width: 31.5%; margin-right: 2.7%; }
  .home-btn:nth-child(6n) { margin-right: 2.7%; }
  .home-btn:nth-child(3n) { margin-right: 0; }
  .cam { width: -webkit-calc(50% - 14px); width: calc(50% - 14px); }
  .rest-clock { font-size: 150px; }
  #tab-claude.active { display: -webkit-flex; display: flex; }
}

/* Telas pequenas (celular antigo) */
@media (max-width: 600px) {
  .clock { font-size: 96px; letter-spacing: -4px; }
  .w-temp { font-size: 60px; }
  .dock-btn { padding: 10px 12px; font-size: 0; }
  .di { margin-right: 0; }
  .rest-clock { font-size: 110px; }
}

/* Até 6 câmeras: os quadros preenchem a tela inteira (3 x 2). */
.cam-grid.fill .cam { height: -webkit-calc(50% - 14px); height: calc(50% - 14px); }
.cam-grid.fill .cam:before { display: none; }
@media (orientation: portrait) {
  .cam-grid.fill .cam { height: -webkit-calc(33.333% - 14px); height: calc(33.333% - 14px); }
}

.m-link { color: #1ed760; text-decoration: none; }

/* ================= Deslizar entre telas ================= */
.tab.active.from-right { -webkit-animation: fromRight .3s ease-out; animation: fromRight .3s ease-out; }
.tab.active.from-left  { -webkit-animation: fromLeft .3s ease-out;  animation: fromLeft .3s ease-out; }
@-webkit-keyframes fromRight { from { opacity: 0; -webkit-transform: translate3d(60px,0,0); } to { opacity: 1; -webkit-transform: none; } }
@keyframes fromRight { from { opacity: 0; transform: translate3d(60px,0,0); } to { opacity: 1; transform: none; } }
@-webkit-keyframes fromLeft { from { opacity: 0; -webkit-transform: translate3d(-60px,0,0); } to { opacity: 1; -webkit-transform: none; } }
@keyframes fromLeft { from { opacity: 0; transform: translate3d(-60px,0,0); } to { opacity: 1; transform: none; } }

/* ================= Câmera única (modo leve) ================= */
.cam-lite { display: none; -webkit-flex: 1; flex: 1; min-height: 0; }
.cam-lite.on { display: -webkit-flex; display: flex; }
.cam-lite .cam-lite-video { -webkit-flex: 1; flex: 1; width: auto; height: 100%; margin: 0 12px 0 0; }
.cam-lite .cam-lite-video:before { display: none; }
.cam-lite-list { width: 30%; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.cam-chip { display: block; width: 100%; text-align: left; -webkit-appearance: none; border: 1px solid rgba(255,255,255,.12);
  background: rgba(14,20,36,.45); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; font-size: 16px; font-weight: 600; }
.cam-chip .dot { display: inline-block; vertical-align: 1px; }
.cam-chip.active { background: rgba(255,255,255,.92); color: #111827; }
.cam-chip.offline { opacity: .45; }

/* ================= Modo leve: Echo Show 5 e telas baixas =================
   Medidas em vh para caber na altura real que o navegador do Echo deixa livre. */
body.lite #app { padding: 2.5vh 2vw 13vh; }
body.lite .row.top { height: 52%; margin-bottom: 2.5vh; }
body.lite .row > * { margin-right: 1.4vw; }
body.lite .row > *:last-child { margin-right: 0; }
body.lite .glass { border-radius: 3.5vh; padding: 2.6vh 1.8vw; }
body.lite .label { font-size: 2.6vh; margin-bottom: 1.4vh; letter-spacing: 1px; }
body.lite .greet { display: none; }
body.lite .clock { font-size: 30vh; letter-spacing: -1.2vh; margin: 0 0 1vh -1vh; }
body.lite .clock .colon { top: -2vh; }
body.lite .date { font-size: 5vh; }
body.lite .weather-card { -webkit-flex: 1.05; flex: 1.05; }
body.lite .w-icon { width: 15vh; height: 15vh; margin-right: 1.5vw; }
body.lite .w-temp { font-size: 13vh; letter-spacing: -.5vh; }
body.lite .w-temp sup { font-size: 6vh; top: 1vh; }
body.lite .w-label { font-size: 3.6vh; margin-top: .5vh; }
body.lite .w-extra { display: none; }
body.lite .w-days { padding-top: 1.5vh; }
body.lite .w-day { padding: 1vh 0; border-radius: 2vh; margin-right: .8vw; }
body.lite .wd-d { font-size: 2.6vh; }
body.lite .wd-i { width: 5.5vh; height: 5.5vh; margin: .4vh auto; }
body.lite .wd-t { font-size: 3vh; }
body.lite .wd-r { display: none; }
body.lite .music-card { -webkit-flex: 1.6; flex: 1.6; }
body.lite .m-inner { padding: 2.4vh 1.8vw; -webkit-flex-direction: row; flex-direction: row; -webkit-align-items: center; align-items: center; }
body.lite .m-head { -webkit-flex: 1; flex: 1; min-width: 0; }
body.lite .m-art { width: 17vh; height: 17vh; border-radius: 2.4vh; margin-right: 1.4vw; }
body.lite .m-meta .label { margin-bottom: .6vh; }
body.lite .m-track { font-size: 4.6vh; }
body.lite .m-artist { font-size: 3.2vh; }
body.lite .m-progress { position: absolute; left: 1.8vw; right: 1.8vw; bottom: 1.6vh; height: .8vh; }
body.lite .m-times { display: none; }
body.lite .m-controls { margin: 0 0 0 1vw; white-space: nowrap; }
body.lite .ibtn { width: 9vh; height: 9vh; padding: 2.4vh; margin: 0 .3vw; }
body.lite .ibtn.play { width: 12vh; height: 12vh; padding: 3.6vh; }
body.lite .status li { padding: 1.6vh 1vw; margin-bottom: 1.2vh; font-size: 3.4vh; border-radius: 2vh; }
body.lite .dot { width: 1.8vh; height: 1.8vh; }
body.lite .status .ms { font-size: 2.8vh; }
body.lite .dock { bottom: 1.6vh; padding: .8vh; border-radius: 3vh; }
body.lite .dock-btn { font-size: 3.4vh; padding: 1.6vh 1.6vw 1.6vh 1.2vw; border-radius: 2.4vh; }
body.lite .di { width: 3.6vh; height: 3.6vh; margin-right: .6vw; vertical-align: -.7vh; }
body.lite .casa-head { margin: 0 .5vw 1.6vh; }
body.lite .home-summary { font-size: 3vh; }
body.lite .home-group-title { font-size: 3vh; margin: .5vh .5vw 1.4vh; }
body.lite .home-btn { width: 18.7%; margin: 0 1.6% 1.6vw 0; height: 24vh; border-radius: 3vh; padding: 2.4vh 1.2vw; font-size: 3.4vh; }
body.lite .home-btn:nth-child(6n) { margin-right: 1.6%; }
body.lite .home-btn:nth-child(5n) { margin-right: 0; }
body.lite .home-btn .hi { width: 5vh; height: 5vh; margin-bottom: 3vh; }
body.lite .home-btn .st { font-size: 2.8vh; }
body.lite .cam-chip { font-size: 3.6vh; padding: 2vh 1.2vw; border-radius: 2.6vh; margin-bottom: 1.4vh; }
body.lite .cam .cam-name { font-size: 3vh; }
body.lite .cam-controls { margin-top: 4vh; }
body.lite .cam-controls .chip { font-size: 3.6vh; padding: 1.8vh 1.4vw; }
body.lite .ptz { width: 30vh; height: 30vh; }
body.lite .ptz-btn { width: 10vh; height: 10vh; font-size: 3.6vh; }
body.lite .ptz-btn.up, body.lite .ptz-btn.down { left: 10vh; }
body.lite .ptz-btn.left, body.lite .ptz-btn.right { top: 10vh; }
body.lite .rest-clock { font-size: 42vh; letter-spacing: -1.5vh; }
body.lite .rest-date { font-size: 5vh; }
body.lite .rest-row { font-size: 4vh; }
