:root{
    --ink:#132621; --sand:#FBFAF5; --card:#FFFFFF; --teal:#0E6E5C; --teal-dark:#0A5748;
    --coral:#E07A46; --green:#1B9C6E; --green-bg:#E7F4EE; --muted:#5F6E68; --hint:#95A19B;
    --line:#ECE7DD; --teal-bg:#E6F0EC; --sand-2:#F3EFE6;
    --font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
    --serif:"Fraunces",Georgia,"Times New Roman",serif;
  }
  *{box-sizing:border-box;-webkit-tap-highlight-color:transparent;margin:0;padding:0}
  html,body{height:100%}
  body{font-family:var(--font);color:var(--ink);background:var(--sand-2);
    display:flex;align-items:center;justify-content:center;line-height:1.5;
    -webkit-font-smoothing:antialiased}

  /* ---- shell: mobile-first single column; sidebar appears on wider screens ---- */
  .app{position:relative;width:100%;height:100vh;height:100dvh;background:var(--sand);
    overflow:hidden;display:flex;flex-direction:column}
  .content{flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden}
  .sidebar{display:none}

  .scroll{flex:1;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}
  .scroll::-webkit-scrollbar{width:0}

  /* ---- screens ---- */
  .screen{display:none;flex-direction:column;flex:1;min-height:0;animation:fade .28s ease}
  .screen.active{display:flex}
  @keyframes fade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

  /* ---- top bar ---- */
  .top{padding:calc(env(safe-area-inset-top) + 18px) 20px 12px;background:var(--sand);
    position:sticky;top:0;z-index:20}
  .brand{display:flex;align-items:center;gap:9px}
  .brand .mark{width:32px;height:32px;border-radius:9px;background:var(--teal);
    display:flex;align-items:center;justify-content:center}
  .brand .mark svg{width:18px;height:18px;stroke:#fff}
  .brand h1{font-family:var(--serif);font-weight:600;font-size:22px;letter-spacing:.5px;line-height:1}
  .wordmark span{display:block;font-size:10.5px;color:var(--muted);letter-spacing:.3px;margin-top:1px}
  .brand .loc{margin-left:auto;display:flex;align-items:center;gap:4px;font-size:13px;color:var(--muted)}
  .brand .loc svg{width:14px;height:14px;stroke:var(--teal)}

  /* ---- search + filters ---- */
  .search{margin:14px 20px 0;display:flex;align-items:center;gap:10px;background:#fff;
    border:1px solid var(--line);border-radius:14px;padding:12px 14px}
  .search svg{width:18px;height:18px;stroke:var(--hint);flex-shrink:0}
  .search span{font-size:14px;color:var(--hint)}
  .chips{display:flex;gap:8px;padding:14px 20px 6px;overflow-x:auto}
  .chips::-webkit-scrollbar{height:0}
  .chip{white-space:nowrap;font-size:13px;padding:7px 14px;border-radius:999px;
    border:1px solid var(--line);background:#fff;color:var(--muted);cursor:pointer;transition:.15s}
  .chip.on{background:var(--teal);color:#fff;border-color:var(--teal);font-weight:500}

  /* ---- listing cards ---- */
  .feed{padding:8px 20px 24px}
  .card{background:#fff;border:1px solid var(--line);border-radius:20px;overflow:hidden;
    margin-bottom:16px;cursor:pointer;transition:.18s}
  .card:active{transform:scale(.985)}
  .photo{height:172px;position:relative;display:flex;align-items:flex-end;padding:12px}
  .photo .ph-ico{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
    width:40px;height:40px;stroke:rgba(255,255,255,.55);stroke-width:1.5}
  .pill{display:inline-flex;align-items:center;gap:5px;background:#fff;border-radius:999px;
    padding:5px 11px;font-size:12px;font-weight:500;color:var(--ink)}
  .pill svg{width:14px;height:14px}
  .pill.verify svg{stroke:var(--green)}
  .count{position:absolute;top:12px;right:12px;background:rgba(19,38,33,.42);color:#fff;
    border-radius:999px;padding:4px 9px;font-size:11px;display:flex;align-items:center;gap:4px;
    backdrop-filter:blur(4px)}
  .count svg{width:12px;height:12px;stroke:#fff}
  .card-body{padding:13px 15px 15px}
  .price-row{display:flex;align-items:baseline;justify-content:space-between}
  .price{font-family:var(--serif);font-size:22px;font-weight:500;letter-spacing:-.4px}
  .price small{font-family:var(--font);font-size:12px;color:var(--muted);font-weight:400}
  .usd{font-size:12px;color:var(--hint)}
  .card-body h3{font-size:15px;font-weight:500;margin:5px 0 3px}
  .meta{font-size:13px;color:var(--muted);display:flex;align-items:center;gap:4px}
  .meta svg{width:14px;height:14px;stroke:var(--muted)}

  /* ---- mobile bottom nav ---- */
  .mobilebar{display:flex;justify-content:space-around;padding:9px 0 calc(env(safe-area-inset-bottom) + 9px);
    border-top:1px solid var(--line);background:var(--sand);z-index:30}
  .tab{background:none;border:none;padding:6px 14px;cursor:pointer;display:flex;flex-direction:column;
    align-items:center;gap:3px;color:var(--hint);font-size:10px;font-family:var(--font)}
  .tab svg{width:23px;height:23px;stroke:var(--hint);fill:none;stroke-width:1.8}
  .tab.on{color:var(--teal)}
  .tab.on svg{stroke:var(--teal)}
  /* hide bottom bar on pushed (non-tab) screens */
  .app[data-screen="detail"] .mobilebar,
  .app[data-screen="verify"] .mobilebar,
  .app[data-screen="schedule"] .mobilebar,
  .app[data-screen="success"] .mobilebar{display:none}

  /* ---- sidebar (shown on tablet/desktop) ---- */
  .side-brand{display:flex;align-items:center;gap:10px;padding:6px 10px 20px}
  .side-brand .mark{width:34px;height:34px;border-radius:10px;background:var(--teal);
    display:flex;align-items:center;justify-content:center;flex-shrink:0}
  .side-brand .mark svg{width:19px;height:19px;stroke:#fff}
  .side-brand h1{font-family:var(--serif);font-weight:600;font-size:22px;letter-spacing:.5px;line-height:1}
  .side-brand .wordmark span{display:block;font-size:10px;color:var(--muted);margin-top:2px}
  .side-nav{display:flex;flex-direction:column;gap:2px}
  .snav{display:flex;align-items:center;gap:12px;padding:11px 12px;border:none;background:none;cursor:pointer;
    border-radius:11px;font-size:14.5px;color:var(--muted);font-family:var(--font);text-align:left;width:100%;transition:.12s}
  .snav svg{width:21px;height:21px;stroke:var(--muted);fill:none;stroke-width:1.8}
  .snav:hover{background:var(--sand-2)}
  .snav.on{background:var(--teal-bg);color:var(--teal-dark);font-weight:500}
  .snav.on svg{stroke:var(--teal-dark)}
  .side-foot{margin-top:auto;padding:12px;font-size:11px;color:var(--hint);display:flex;align-items:center;gap:7px}
  .side-foot .dot{width:7px;height:7px;border-radius:50%;background:var(--green)}

  /* ---- detail ---- */
  .hero{height:280px;position:relative;display:flex;align-items:flex-end;padding:16px}
  .back{position:absolute;top:calc(env(safe-area-inset-top) + 14px);left:16px;width:38px;height:38px;
    border-radius:50%;background:#fff;border:none;display:flex;align-items:center;justify-content:center;
    cursor:pointer;box-shadow:0 2px 10px rgba(19,38,33,.15)}
  .back svg{width:20px;height:20px;stroke:var(--ink)}
  .detail-body{padding:20px}
  .detail-body .price{font-size:28px}
  .detail-body .usd{font-size:13px}
  .dtitle{font-size:19px;font-weight:500;margin:8px 0 4px;letter-spacing:-.2px}
  .specs{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}
  .spec{font-size:13px;color:var(--muted);background:var(--sand-2);border-radius:10px;
    padding:8px 12px;display:flex;align-items:center;gap:6px}
  .spec svg{width:16px;height:16px;stroke:var(--muted)}
  .divider{height:1px;background:var(--line);margin:4px 0}
  .landlord{display:flex;align-items:center;gap:12px;padding:16px 0}
  .avatar{width:42px;height:42px;border-radius:50%;background:var(--teal-bg);color:var(--teal-dark);
    display:flex;align-items:center;justify-content:center;font-weight:500;font-size:14px;flex-shrink:0}
  .landlord .n{font-size:14px;font-weight:500;display:flex;align-items:center;gap:5px}
  .landlord .n svg{width:15px;height:15px;stroke:var(--green)}
  .landlord .s{font-size:12px;color:var(--hint)}
  .landlord .msg{margin-left:auto;width:40px;height:40px;border-radius:12px;border:1px solid var(--line);
    background:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer}
  .landlord .msg svg{width:19px;height:19px;stroke:var(--muted)}
  .about{font-size:14px;color:var(--muted);line-height:1.65;padding:14px 0}
  .amen{display:grid;grid-template-columns:1fr 1fr;gap:10px 14px;padding:6px 0 20px}
  .amen div{font-size:13.5px;color:var(--ink);display:flex;align-items:center;gap:8px}
  .amen svg{width:16px;height:16px;stroke:var(--teal)}

  /* ---- sticky CTA footer ---- */
  .cta-bar{padding:14px 20px calc(env(safe-area-inset-bottom) + 14px);border-top:1px solid var(--line);
    background:var(--sand)}
  .btn{width:100%;height:52px;border:none;border-radius:15px;background:var(--teal);color:#fff;
    font-family:var(--font);font-size:16px;font-weight:500;cursor:pointer;display:flex;
    align-items:center;justify-content:center;gap:8px;transition:.15s}
  .btn:active{transform:scale(.985);background:var(--teal-dark)}
  .btn svg{width:19px;height:19px;stroke:#fff}
  .btn.ghost{background:#fff;color:var(--ink);border:1px solid var(--line)}
  .btn.ghost svg{stroke:var(--ink)}
  .lockline{font-size:12px;color:var(--hint);text-align:center;margin-top:11px;
    display:flex;align-items:center;justify-content:center;gap:6px}
  .lockline svg{width:13px;height:13px;stroke:var(--hint)}

  /* ---- generic sub-header ---- */
  .subhead{display:flex;align-items:center;gap:10px;padding:calc(env(safe-area-inset-top) + 18px) 20px 8px}
  .subhead .back{position:static;box-shadow:none;border:1px solid var(--line);width:36px;height:36px}
  .subhead h2{font-size:16px;font-weight:500}

  /* ---- verification ---- */
  .prog{display:flex;gap:5px;padding:6px 20px 4px}
  .prog i{flex:1;height:4px;border-radius:999px;background:var(--line)}
  .prog i.on{background:var(--teal)}
  .pstep{font-size:12px;color:var(--hint);padding:0 20px 16px}
  .vbody{padding:4px 20px 20px}
  .vbody h3{font-size:20px;font-weight:500;font-family:var(--serif);margin-bottom:5px}
  .vbody .lead{font-size:14px;color:var(--muted);line-height:1.55;margin-bottom:20px}
  .field{margin-bottom:14px}
  .field label{display:block;font-size:13px;color:var(--muted);margin-bottom:6px}
  .field input{width:100%;height:48px;border:1px solid var(--line);border-radius:13px;padding:0 14px;
    font-size:15px;font-family:var(--font);background:#fff;color:var(--ink)}
  .field input:focus{outline:none;border-color:var(--teal);box-shadow:0 0 0 3px var(--teal-bg)}
  .drop{border:1.5px dashed #D8D2C4;border-radius:15px;padding:26px 16px;text-align:center;cursor:pointer;
    margin-bottom:12px;transition:.15s;background:#fff}
  .drop:active{border-color:var(--teal);background:var(--teal-bg)}
  .drop svg{width:28px;height:28px;stroke:var(--hint);margin-bottom:8px}
  .drop .t{font-size:14px;font-weight:500}
  .drop .h{font-size:12px;color:var(--hint);margin-top:2px}
  .done{border:1px solid var(--green);background:var(--green-bg);border-radius:15px;padding:15px;
    display:flex;align-items:center;gap:12px;margin-bottom:12px}
  .done svg.chk{width:26px;height:26px;stroke:var(--green);flex-shrink:0}
  .done .t{font-size:14px;font-weight:500}
  .done .s{font-size:12px;color:var(--green)}
  .done svg.re{width:17px;height:17px;stroke:var(--muted);margin-left:auto;cursor:pointer}
  .review-row{display:flex;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid var(--line)}
  .review-row svg{width:20px;height:20px;stroke:var(--green)}
  .review-row .t{font-size:14px;font-weight:500}
  .review-row .s{font-size:12px;color:var(--hint)}

  /* ---- success ---- */
  .success{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
    text-align:center;padding:40px 32px}
  .success .ring{width:88px;height:88px;border-radius:50%;background:var(--green-bg);
    display:flex;align-items:center;justify-content:center;margin-bottom:24px}
  .success .ring svg{width:44px;height:44px;stroke:var(--green);stroke-width:2.2}
  .success h2{font-family:var(--serif);font-size:26px;font-weight:500;margin-bottom:10px}
  .success p{font-size:15px;color:var(--muted);line-height:1.6;max-width:280px}

  /* ---- scheduling ---- */
  .sched-body{padding:6px 20px 20px}
  .sched-body h3{font-size:15px;font-weight:500;margin:18px 0 10px}
  .days{display:flex;gap:9px;overflow-x:auto;padding-bottom:4px}
  .days::-webkit-scrollbar{height:0}
  .day{flex-shrink:0;width:58px;padding:12px 0;border:1px solid var(--line);border-radius:14px;
    text-align:center;cursor:pointer;background:#fff;transition:.15s}
  .day.on{background:var(--teal);border-color:var(--teal);color:#fff}
  .day .dow{font-size:11px;color:inherit;opacity:.7}
  .day .dnum{font-size:18px;font-weight:500;font-family:var(--serif);margin-top:2px}
  .slots{display:grid;grid-template-columns:1fr 1fr 1fr;gap:9px}
  .slot{padding:12px 0;border:1px solid var(--line);border-radius:12px;text-align:center;font-size:13px;
    cursor:pointer;background:#fff;transition:.15s}
  .slot.on{background:var(--teal);border-color:var(--teal);color:#fff;font-weight:500}
  .listing-mini{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--line);
    border-radius:15px;padding:12px;margin-top:4px}
  .listing-mini .thumb{width:52px;height:52px;border-radius:11px;flex-shrink:0}
  .listing-mini .mt{font-size:14px;font-weight:500}
  .listing-mini .ms{font-size:12px;color:var(--muted);font-family:var(--serif)}

  /* ---- save heart on detail ---- */
  .save{position:absolute;top:calc(env(safe-area-inset-top) + 14px);right:16px;width:38px;height:38px;
    border-radius:50%;background:#fff;border:none;display:flex;align-items:center;justify-content:center;
    cursor:pointer;box-shadow:0 2px 10px rgba(19,38,33,.15)}
  .save svg{width:20px;height:20px;stroke:var(--ink);fill:none}
  .save.on svg{stroke:var(--coral);fill:var(--coral)}
  .hero .count{position:static;margin-left:auto}

  /* ---- section title inside tab screens ---- */
  .page-head{padding:calc(env(safe-area-inset-top) + 22px) 20px 6px}
  .page-head h2{font-family:var(--serif);font-size:24px;font-weight:500;letter-spacing:-.3px}
  .page-head p{font-size:13px;color:var(--muted);margin-top:2px}

  /* ---- empty states ---- */
  .empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
    text-align:center;padding:60px 40px;gap:14px}
  .empty .eic{width:64px;height:64px;border-radius:50%;background:var(--sand-2);display:flex;
    align-items:center;justify-content:center}
  .empty .eic svg{width:28px;height:28px;stroke:var(--hint)}
  .empty h3{font-size:16px;font-weight:500}
  .empty p{font-size:13.5px;color:var(--muted);max-width:250px;line-height:1.55}
  .empty button{margin-top:6px;height:44px;padding:0 22px;border-radius:13px;background:var(--teal);
    color:#fff;border:none;font-size:14px;font-weight:500;font-family:var(--font);cursor:pointer}

  /* ---- saved: compact rows ---- */
  .srow{display:flex;align-items:center;gap:13px;background:#fff;border:1px solid var(--line);
    border-radius:16px;padding:11px;margin-bottom:12px;cursor:pointer}
  .srow .sth{width:66px;height:66px;border-radius:12px;flex-shrink:0;position:relative}
  .srow .sth svg{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:20px;height:20px;stroke:rgba(255,255,255,.6)}
  .srow .si{flex:1;min-width:0}
  .srow .sp{font-family:var(--serif);font-size:18px;font-weight:500}
  .srow .sp small{font-family:var(--font);font-size:11px;color:var(--muted)}
  .srow .snm{font-size:13.5px;font-weight:500;margin:2px 0 1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .srow .slc{font-size:12px;color:var(--muted)}
  .srow .unsave{width:34px;height:34px;flex-shrink:0;border:none;background:none;cursor:pointer;display:flex;align-items:center;justify-content:center}
  .srow .unsave svg{width:20px;height:20px;stroke:var(--coral);fill:var(--coral)}

  /* ---- calendar ---- */
  .cal{margin:8px 20px 0;background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px}
  .cal-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
  .cal-top .m{font-size:15px;font-weight:500}
  .cal-top button{width:32px;height:32px;border-radius:9px;border:1px solid var(--line);background:#fff;
    cursor:pointer;display:flex;align-items:center;justify-content:center}
  .cal-top button svg{width:16px;height:16px;stroke:var(--muted)}
  .cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;text-align:center}
  .cal-grid .dh{font-size:11px;color:var(--hint);padding:4px 0;font-weight:500}
  .cal-cell{aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
    font-size:13px;color:var(--ink);border-radius:10px;position:relative}
  .cal-cell.muted{color:#CFCabb}
  .cal-cell.today{background:var(--sand-2);font-weight:600}
  .cal-cell.has{color:var(--teal-dark);font-weight:600}
  .cal-cell .dot{width:5px;height:5px;border-radius:50%;background:var(--teal);position:absolute;bottom:5px}

  /* ---- viewing list items ---- */
  .vlist{padding:18px 20px 24px}
  .vlist h3{font-size:13px;color:var(--muted);font-weight:500;margin:6px 0 12px;text-transform:none}
  .vitem{display:flex;align-items:center;gap:13px;background:#fff;border:1px solid var(--line);
    border-radius:16px;padding:13px;margin-bottom:12px}
  .vitem .vd{width:52px;height:52px;border-radius:12px;background:var(--teal-bg);flex-shrink:0;
    display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--teal-dark)}
  .vitem .vd .vm{font-size:10px;text-transform:uppercase;letter-spacing:.5px}
  .vitem .vd .vn{font-size:19px;font-weight:600;font-family:var(--serif);line-height:1}
  .vitem .vi{flex:1;min-width:0}
  .vitem .vt{font-size:14px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .vitem .vs{font-size:12.5px;color:var(--muted);margin-top:1px}
  .badge{font-size:11px;font-weight:500;padding:4px 10px;border-radius:999px;white-space:nowrap}
  .badge.pending{background:#FBEEDD;color:#B26A20}
  .badge.confirmed{background:var(--green-bg);color:var(--green)}

  /* ---- profile ---- */
  .prof-top{display:flex;flex-direction:column;align-items:center;text-align:center;padding:12px 20px 20px}
  .prof-av{width:76px;height:76px;border-radius:50%;background:var(--teal-bg);color:var(--teal-dark);
    display:flex;align-items:center;justify-content:center;font-size:26px;font-weight:500;font-family:var(--serif);margin-bottom:12px}
  .prof-name{font-size:19px;font-weight:500}
  .prof-status{display:inline-flex;align-items:center;gap:5px;font-size:12.5px;padding:5px 12px;
    border-radius:999px;margin-top:8px}
  .prof-status.yes{background:var(--green-bg);color:var(--green)}
  .prof-status.yes svg{width:14px;height:14px;stroke:var(--green)}
  .prof-status.no{background:#FBEEDD;color:#B26A20}
  .verify-card{margin:0 20px 20px;background:var(--teal);border-radius:18px;padding:18px;color:#fff;
    display:flex;align-items:center;gap:14px;cursor:pointer}
  .verify-card svg{width:30px;height:30px;stroke:#fff;flex-shrink:0}
  .verify-card .vt{font-size:15px;font-weight:500}
  .verify-card .vs{font-size:12.5px;opacity:.85;margin-top:2px}
  .plist{margin:0 20px}
  .prow{display:flex;align-items:center;gap:14px;padding:15px 0;border-bottom:1px solid var(--line);cursor:pointer}
  .prow:last-child{border-bottom:none}
  .prow>svg:first-child{width:21px;height:21px;stroke:var(--muted);flex-shrink:0}
  .prow .pl{flex:1;font-size:14.5px}
  .prow .pv{font-size:13px;color:var(--hint)}
  .prow .chev{width:17px;height:17px;stroke:var(--hint)}

  .placeholder-note{text-align:center;font-size:12px;color:var(--hint);padding:30px 20px}

  /* ===================================================================
     TABLET & DESKTOP  (>= 768px)
     Sidebar nav on the left, grid feed, centered content columns.
     =================================================================== */
  @media(min-width:768px){
    .app{flex-direction:row}
    .mobilebar{display:none}

    .sidebar{display:flex;flex-direction:column;width:240px;flex-shrink:0;
      border-right:1px solid var(--line);background:var(--sand);padding:22px 14px}
    .content{flex:1;min-width:0}

    /* feed becomes a responsive grid */
    #feed{max-width:1120px;margin:0 auto;width:100%;display:grid;
      grid-template-columns:repeat(auto-fill,minmax(272px,1fr));gap:22px;padding:14px 36px 44px}
    #feed .card{margin-bottom:0}
    .top{max-width:1120px;margin:0 auto;width:100%;padding:26px 36px 6px}
    .top .brand{display:none}          /* brand lives in the sidebar now */
    .top .search{max-width:520px;margin:0}
    .chips{max-width:1120px;margin:0 auto;width:100%;padding:16px 36px 6px}

    /* focused / task screens sit in a comfortable centered column */
    .page-head,.detail-body,.vbody,.sched-body,.subhead,.prog,.pstep,
    .prof-top,.plist,#pf-verifycard,.verify-card,.vlist,.cal,#saved-list,.cta-bar,.success{
      max-width:660px;margin-left:auto;margin-right:auto;width:100%}
    .page-head,.subhead{padding-top:30px}

    /* detail hero as a contained rounded image, not full-bleed */
    .hero{max-width:700px;margin:26px auto 0;height:380px;border-radius:22px;overflow:hidden}

    /* action bars: no top divider, just breathing room */
    .cta-bar{border-top:none;background:transparent;padding-top:18px;padding-bottom:30px}

    /* a little more polish on hover for cards & rows on desktop */
    .card{transition:transform .15s, box-shadow .15s}
    .card:hover{transform:translateY(-3px);box-shadow:0 14px 30px -18px rgba(19,38,33,.4)}
    .srow:hover{border-color:var(--teal)}
  }

  /* very wide screens: cap the feed columns so cards don't get huge */
  @media(min-width:1280px){
    #feed{grid-template-columns:repeat(3,1fr)}
  }