/* utv.qt — "desert night" look. Only active when <html> has class v2. */
html.v2{
  --bg:#0b0a09; --surface:rgba(255,248,240,.045); --surface2:#17130f; --ink:#f7f0e7; --muted:#a99b8b; --line:rgba(255,236,214,.10);
  --accent:#f59238; --accent2:#ff6a1a; --accent-ink:#1b0e03; --danger:#ff8a80; --sand:#e9c58f;
  color-scheme:dark;
}
html.v2 body{
  background:
    radial-gradient(900px 520px at 85% -10%, rgba(245,146,56,.20), transparent 60%),
    radial-gradient(700px 480px at 0% 8%, rgba(233,197,143,.08), transparent 60%),
    var(--bg);
  background-attachment:fixed;
  font-size:16px;
}
html.v2 main{max-width:860px;gap:22px;padding-top:28px}
html.v2 h2{font-size:21px;font-weight:600;letter-spacing:-.2px}

/* header */
html.v2 header.top{flex-direction:column;align-items:center;text-align:center;border:0;padding-bottom:0;gap:14px}
html.v2 header.top>div:first-child{display:flex;flex-direction:column;align-items:center;gap:6px}
html.v2 h1.logo img{height:84px;filter:drop-shadow(0 6px 24px rgba(245,146,56,.25))}
@media(max-width:480px){html.v2 h1.logo img{height:66px}}
html.v2 header.top .muted{font-size:14px;letter-spacing:.2px}
html.v2 header.top .tools{justify-content:center}
html.v2 header.top::after{content:"";display:block;width:100%;height:1px;margin-top:6px;
  background:linear-gradient(90deg,transparent,rgba(245,146,56,.6),transparent)}

/* buttons */
html.v2 button,html.v2 .btn{border-radius:14px;background:var(--surface);border-color:var(--line);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);transition:transform .12s ease,background .2s,border-color .2s}
html.v2 button:hover,html.v2 .btn:hover{border-color:rgba(245,146,56,.45)}
html.v2 button:active{transform:scale(.97)}
html.v2 button.primary,html.v2 .btn.primary{background:linear-gradient(135deg,var(--accent),var(--accent2));border:0;color:var(--accent-ink);font-weight:700;box-shadow:0 6px 22px rgba(255,106,26,.30)}
html.v2 button.link{background:none;backdrop-filter:none}
html.v2 button.ghost{background:transparent}

/* tabs: sticky glass pill */
html.v2 .tabs{position:sticky;top:10px;z-index:4;border-radius:18px;padding:5px;background:rgba(23,19,15,.72);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:1px solid var(--line);box-shadow:0 10px 30px rgba(0,0,0,.35)}
html.v2 .tabs button{border-radius:13px;background:transparent;backdrop-filter:none;color:var(--muted);font-weight:600}
html.v2 .tabs button[aria-pressed="true"]{background:linear-gradient(135deg,var(--accent),var(--accent2));color:var(--accent-ink);box-shadow:0 4px 16px rgba(255,106,26,.35)}

/* cards and boxes */
html.v2 .note,html.v2 .find,html.v2 .progress,html.v2 .kpi,html.v2 .pcard{background:var(--surface);border:1px solid var(--line);border-radius:20px;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
html.v2 .find{position:relative;overflow:hidden;padding:18px 20px;border-color:rgba(245,146,56,.35);
  background:linear-gradient(135deg,rgba(245,146,56,.16),rgba(255,106,26,.04) 60%),var(--surface)}
html.v2 .find p{font-size:16px;font-weight:500}
html.v2 .find::before{content:"";position:absolute;inset-inline-end:-40px;top:-40px;width:140px;height:140px;border-radius:50%;background:radial-gradient(circle,rgba(245,146,56,.28),transparent 70%)}
html.v2 input[type=text],html.v2 input[type=search],html.v2 input[type=date],html.v2 input[type=password],html.v2 textarea{border-radius:14px;background:rgba(255,248,240,.05);border-color:var(--line);color:var(--ink)}
html.v2 input[type=search]{min-height:50px;padding-inline-start:16px}
html.v2 dialog{background:var(--surface2);border-color:var(--line);border-radius:22px;box-shadow:0 30px 80px rgba(0,0,0,.6)}

/* week headings */
html.v2 .week{gap:12px}
html.v2 .week h2{display:flex;align-items:center;gap:10px;font-size:14px;color:var(--sand);font-weight:600;letter-spacing:.3px}
html.v2 .week h2::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,rgba(233,197,143,.35),transparent)}
html.v2 [dir=rtl] .week h2::after,html.v2 .week h2::after{background:linear-gradient(270deg,rgba(233,197,143,.35),transparent)}

/* albums: big photo cards */
html.v2 .days{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}
html.v2 .day{position:relative;display:block;aspect-ratio:4/3;min-height:0;padding:0;border:1px solid var(--line);border-radius:22px;overflow:hidden;background:var(--surface2);box-shadow:0 12px 30px rgba(0,0,0,.35);isolation:isolate}
html.v2 .day .cover{position:absolute;inset:0;width:auto;min-height:0;transition:transform .5s ease}
html.v2 .day:hover .cover{transform:scale(1.05)}
html.v2 .day::after{content:"";position:absolute;inset:0;z-index:0;background:linear-gradient(to top,rgba(8,6,4,.92) 0%,rgba(8,6,4,.35) 45%,rgba(8,6,4,0) 70%)}
html.v2 .day .info{position:absolute;inset-inline:0;bottom:0;z-index:1;padding:14px 16px;gap:0}
html.v2 .day .name{font-size:20px;font-weight:700;color:#fff;text-shadow:0 2px 10px rgba(0,0,0,.6)}
html.v2 .day .when{color:rgba(255,240,225,.78);font-size:13px}
html.v2 .day .count{position:absolute;top:12px;inset-inline-start:12px;z-index:1;padding:3px 11px;border-radius:999px;background:rgba(10,8,6,.55);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);color:#fff;font-size:12px;font-weight:600;border:1px solid rgba(255,255,255,.12)}
html.v2 .chip{background:linear-gradient(135deg,var(--accent),var(--accent2));color:var(--accent-ink);box-shadow:0 2px 10px rgba(255,106,26,.45)}

/* banner */
html.v2 .banner{border-radius:22px;padding:18px 20px;background:linear-gradient(135deg,var(--accent),var(--accent2));box-shadow:0 12px 34px rgba(255,106,26,.28)}
html.v2 .banner.hasbg{min-height:190px;box-shadow:0 12px 34px rgba(0,0,0,.45)}
html.v2 .banner b{font-size:22px}

/* photo strips and grids */
html.v2 .strip{gap:10px;padding-bottom:10px}
html.v2 .strip button{width:120px;height:150px;border-radius:16px;border:1px solid var(--line);backdrop-filter:none}
html.v2 .grid{grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:5px}
html.v2 .grid button{border-radius:12px;backdrop-filter:none}
html.v2 .results{gap:12px}
html.v2 .hit{border-radius:16px;backdrop-filter:none}
html.v2 .hit img{border-radius:0}

/* small things */
html.v2 .live{background:rgba(46,204,113,.10);border-color:rgba(46,204,113,.35)}
html.v2 .map{border-radius:20px}
html.v2 .selbar{background:rgba(23,19,15,.85);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-top-color:var(--line)}
html.v2 footer{opacity:.8}
@media (prefers-reduced-motion:reduce){html.v2 .day .cover,html.v2 button{transition:none}}
@media(max-width:560px){html.v2 .day{aspect-ratio:16/10}}

/* ===== v2.1: hero on the home page + app-style bottom bar ===== */
html.v2.home header.top{
  position:relative;width:100vw;margin-inline:calc(50% - 50vw);margin-top:-28px;
  min-height:380px;justify-content:flex-end;padding:40px 16px 70px;overflow:hidden;isolation:isolate}
html.v2.home header.top::before{content:"";position:absolute;inset:-20px;z-index:-2;
  background:var(--hero) center/cover no-repeat;filter:saturate(1.15) blur(1.5px);transform:scale(1.04)}
html.v2.home header.top::after{content:"";position:absolute;inset:0;z-index:-1;width:auto;height:auto;margin:0;
  background:linear-gradient(to bottom,rgba(11,10,9,.25) 0%,rgba(11,10,9,.45) 45%,rgba(11,10,9,.92) 85%,var(--bg) 100%)}
html.v2.home h1.logo img{height:104px}
@media(max-width:480px){html.v2.home h1.logo img{height:80px}html.v2.home header.top{min-height:330px}}
html.v2.home header.top .muted{color:rgba(255,240,225,.88);font-size:15px;font-weight:500;text-shadow:0 2px 10px rgba(0,0,0,.6)}
/* the search card floats over the bottom of the hero */
html.v2.home #view{margin-top:-64px;position:relative;z-index:2}
html.v2.home .find{box-shadow:0 18px 50px rgba(0,0,0,.55)}

/* bottom bar on phones */
@media(max-width:700px){
  html.v2 .tabs{position:fixed;top:auto;bottom:calc(10px + env(safe-area-inset-bottom));left:12px;right:12px;z-index:6;
    padding:6px;border-radius:24px;background:rgba(20,16,12,.82);box-shadow:0 14px 40px rgba(0,0,0,.55)}
  html.v2 .tabs button{flex-direction:column;gap:2px;min-height:54px;font-size:12px;padding:4px 2px;border-radius:18px}
  html.v2 .tabs button::before{content:"";width:22px;height:22px;background:currentColor;
    -webkit-mask:var(--ic) center/contain no-repeat;mask:var(--ic) center/contain no-repeat}
  html.v2 body{padding-bottom:96px}
  html.v2 body.selecting .tabs{display:none}
}
html.v2 .tabs button:nth-child(1){--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E")}
html.v2 .tabs button:nth-child(2){--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 19c3-5 6-8 10-8s7 3 10 8z'/%3E%3Cpath d='M7 19c2-3 3.5-4.5 5-4.5'/%3E%3C/svg%3E")}
html.v2 .tabs button:nth-child(3){--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z'/%3E%3C/svg%3E")}
html.v2 .tabs button:nth-child(4){--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h12v18l-6-4-6 4z'/%3E%3C/svg%3E")}
html.v2 .tabs button[aria-pressed="true"]::before{background:var(--accent-ink)}
