  :root{
    --stone:#EDE3CC;
    --stone-deep:#D7C49C;
    --paper:#FBF6EA;
    --indigo:#20283F;
    --indigo-soft:#48527A;
    --terracotta:#BD5B34;
    --terracotta-dark:#9A4726;
    --brass:#AD8328;
    --green:#3FAE54;
    --green-dark:#2E8A41;
    --ink:#241D14;
    --ink-soft:#6B5F4B;
    --line:#CBB98C;
    --radius:14px;
    --shadow:0 8px 28px rgba(36,29,20,.14);
  }
  *{box-sizing:border-box;}
  body{margin:0;}
  .vastu-app{
    font-family:'Work Sans',system-ui,sans-serif;
    color:var(--ink);
    background:var(--stone);
    background-image:radial-gradient(circle at 18% 8%, rgba(173,131,40,.10), transparent 45%),
                      radial-gradient(circle at 85% 92%, rgba(189,91,52,.08), transparent 50%);
    padding:40px 20px 28px;
    border-radius:15px;
  }
  .vastu-shell{max-width:880px;margin:0 auto;}
  .vastu-eyebrow{
    font-family:'Work Sans',sans-serif;
    font-size:12px;letter-spacing:.18em;text-transform:uppercase;
    color:var(--terracotta-dark);font-weight:600;margin:0 0 6px;
  }
  .vastu-h1{
    font-family:'Cormorant',serif;font-weight:600;
    font-size:clamp(30px,4.4vw,44px);line-height:1.06;margin:0 0 10px;color:var(--indigo);
  }
  .vastu-sub{font-size:15px;color:var(--ink-soft);max-width:560px;line-height:1.55;margin:0 0 30px;}

  /* Stepper */
  .vastu-stepper{display:flex;gap:0;margin:0 0 30px;list-style:none;padding:0;}
  .vastu-step-pip{flex:1;display:flex!important;flex-direction:column!important;align-items:flex-start;position:relative;padding-bottom:14px;border-bottom:2px solid var(--line);min-height:78px!important;box-sizing:border-box!important;margin-bottom:0!important;margin-top:0!important;}
  .vastu-step-pip + .vastu-step-pip{margin-left:10px;}
  .vastu-step-pip .num{
    font-family:'Cormorant',serif;font-weight:600;font-size:22px;color:var(--ink-soft);
    line-height:1;margin-bottom:6px;
  }
  .vastu-step-pip .lbl{display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;font-size:11.5px;color:var(--ink-soft);letter-spacing:.02em;line-height:1.3!important;box-sizing:border-box!important;width:100%;}
  .vastu-step-pip.is-active{border-color:var(--terracotta);}
  .vastu-step-pip.is-active .num{color:var(--terracotta-dark);}
  .vastu-step-pip.is-active .lbl{color:var(--ink);font-weight:500;}
  .vastu-step-pip.is-done{border-color:var(--brass);}
  .vastu-step-pip.is-done .num{color:var(--brass);}
  .vastu-step-pip.is-done .num::after{content:" ✓";font-size:14px;}

  /* Card */
  .vastu-card{
    background:var(--paper);border:1px solid var(--stone-deep);border-radius:var(--radius);
    box-shadow:var(--shadow);padding:28px;
  }
  .vastu-step-panel{display:none;animation:vastuFade .25s ease;}
  .vastu-step-panel.is-active{display:block;}
  @media (prefers-reduced-motion: reduce){.vastu-step-panel{animation:none;}}
  @keyframes vastuFade{from{opacity:0;transform:translateY(4px);}to{opacity:1;transform:none;}}

  .vastu-step-title{
    font-family:'Cormorant',serif;font-weight:600;font-size:24px;color:var(--indigo);margin:0 0 6px;
  }
  .vastu-step-help{font-size:14px;color:var(--ink-soft);line-height:1.55;margin:0 0 20px;max-width:620px;}

  /* ПАТЧ 1: зменшено padding з 55px до 52px щоб підписи вміщувались у полосу між рамками */
  #vastuCompassWrap{ position:relative; padding:52px 0; box-sizing:border-box; }
  @media (max-width:640px){ #vastuCompassWrap{ padding:38px 0; } }

  /* HTML-підписи сторін світу в абсолютному оверлеї поверх canvas */
  .vdl{ position:absolute; line-height:1.35; }
  .vdl-dir{ font-weight:700; color:#20283F; }
  .vdl-planet{ font-weight:700; }
  .vdl-center{ text-align:center; }
  .vdl-right{ text-align:right; }

  .vastu-report-tagline{
    font-size:13px;letter-spacing:.08em;text-transform:uppercase;font-weight:700;
    color:var(--terracotta-dark);margin:0 0 12px;
  }

  #vastuExportReport{
    display:none;
    position:fixed; left:-9999px; top:0;
    width:1280px; height:836px;
    background:none;
  }
  .vexp-mandala-overlay{
    position:absolute; left:7.31%; top:12.55%; width:55.11%; height:84.38%;
    overflow:visible;
  }
  .vexp-mandala-overlay img{
    position:absolute; inset:0; width:100%; height:100%; object-fit:contain; object-position:left center;
  }

  /* Step 1: upload */
  .vastu-drop{
    border:2px dashed var(--stone-deep);border-radius:12px;background:#fff;
    min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;
    gap:10px;text-align:center;padding:30px;cursor:pointer;transition:.15s;
  }
  .vastu-drop.is-drag{border-color:var(--terracotta);background:#FFF8F0;}
  .vastu-drop svg{width:38px;height:38px;color:var(--brass);}
  .vastu-drop .t1{font-size:15px;font-weight:500;color:var(--ink);}
  .vastu-drop .t2{font-size:13px;color:var(--ink-soft);}
  .vastu-drop input{display:none;}
  .vastu-drop-preview{max-width:100%;max-height:200px;border-radius:8px;display:none;}

  /* Map steps */
  .vastu-search-row{display:flex;gap:10px;margin-bottom:14px;}
  #vastuPacContainer{flex:1;min-width:0;}
  gmp-place-autocomplete{width:100%;max-width:100%;display:block;box-sizing:border-box;}
  .vastu-map-wrap{position:relative;border-radius:10px;overflow:hidden;border:1px solid var(--stone-deep);height:380px;background:#e9e4d3;}
  .vastu-map-wrap > div[id^="vastuMap"]{position:absolute;inset:0;}
  .vastu-line-svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;}
  .vastu-line-svg line{stroke:var(--terracotta);stroke-width:3;stroke-linecap:round;}
  .vastu-line-handle{
    position:absolute;width:20px;height:20px;margin:-10px 0 0 -10px;border-radius:50%;
    background:var(--terracotta);border:3px solid #fff;box-shadow:0 1px 5px rgba(0,0,0,.45);
    cursor:grab;touch-action:none;
  }
  .vastu-angle-readout{
    position:absolute;top:10px;left:10px;background:rgba(32,40,63,.88);color:#fff;
    font-size:12.5px;padding:6px 10px;border-radius:7px;pointer-events:none;font-variant-numeric:tabular-nums;
  }
  .vastu-map-hint{margin-top:10px;font-size:12.5px;color:var(--ink-soft);}

  /* Canvas steps */
  .vastu-canvas-wrap{border:1px solid var(--stone-deep);border-radius:10px;overflow:hidden;min-height:440px;background:repeating-conic-gradient(#f3eedd 0% 25%, #ece4cd 0% 50%) 50% / 22px 22px;}
  #vastuCanvasHost{width:100%;height:440px;}
  #vastuCanvasHost2{ width:100%; height:620px; }
  #vastuCanvasHost2 ~ * { border:none; }
  #vastuCompassWrap .vastu-canvas-wrap{ border:none; background:transparent; }
  .vastu-canvas-tools{display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin-top:14px;}
  .vastu-pill-btn{
    border:1px solid var(--stone-deep);background:#fff;border-radius:999px;padding:8px 16px;
    font-size:13px;cursor:pointer;color:var(--indigo);font-weight:500;transition:.15s;
  }
  .vastu-pill-btn:hover{border-color:var(--terracotta);color:var(--terracotta-dark);}
  .vastu-slider-group{display:flex;align-items:center;gap:10px;font-size:13px;color:var(--ink-soft);}
  .vastu-slider-group input[type=range]{accent-color:var(--terracotta);width:140px;}

  .vastu-save-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:14px;}
  .vastu-input{
    border:1px solid var(--stone-deep);border-radius:8px;padding:10px 14px;font-size:14px;
    font-family:inherit;flex:1;min-width:180px;background:#fff;color:var(--ink);
  }
  .vastu-input:focus{outline:2px solid var(--terracotta);outline-offset:1px;}

  /* Nav */
  .vastu-nav{display:flex;align-items:center;justify-content:space-between;margin-top:24px;flex-wrap:wrap;gap:10px;}
  .vastu-nav-left{display:flex;gap:10px;}
  .vastu-nav > div:last-child{display:flex;gap:14px;align-items:center;flex-wrap:wrap;min-width:0;}
  .vastu-btn{
    appearance:none;border:none;border-radius:10px;padding:13px 24px;font-size:14.5px;font-weight:600;
    cursor:pointer;font-family:inherit;transition:.15s;
  }
  .vastu-btn-primary{background:var(--terracotta);color:#fff;}
  .vastu-btn-primary:hover{background:var(--terracotta-dark);}
  .vastu-btn-primary:disabled{background:#D8C9A3;color:#fff8;cursor:not-allowed;}
  .vastu-btn-ghost{background:transparent;color:var(--indigo);border:1px solid var(--stone-deep);}
  .vastu-btn-ghost:hover{border-color:var(--indigo);}
  .vastu-btn-text{background:none;border:none;color:var(--ink-soft);font-size:13px;cursor:pointer;text-decoration:underline;text-underline-offset:3px;font-family:inherit;}

  .vastu-foot-note{font-size:11.5px;color:var(--ink-soft);text-align:center;margin-top:22px;opacity:.8;}

  /* ---- Мобільна адаптація ---- */
  @media (max-width: 640px){
    .vastu-app{ padding:20px 12px 40px; }
    .vastu-card{ padding:16px; }
    .vastu-sub{ font-size:14px; margin-bottom:20px; }

    .vastu-stepper{ flex-wrap:wrap; row-gap:10px; }
    .vastu-step-pip{ flex:1 1 30%; min-width:30%; }
    .vastu-step-pip .num{ font-size:18px; }
    .vastu-step-pip .lbl{ font-size:10px; }

    .vastu-step-title{ font-size:20px; }
    .vastu-step-help{ font-size:13px; }

    .vastu-map-wrap{ height:300px; }
    #vastuCanvasHost{ height:340px; }
    #vastuCanvasHost2{ height:520px; }
    .vastu-canvas-wrap{ min-height:340px; }

    .vastu-line-handle{ width:28px; height:28px; margin:-14px 0 0 -14px; }

    .vastu-nav{ flex-wrap:wrap; gap:12px; }
    .vastu-nav-left{ order:2; width:100%; }
    .vastu-nav > div:last-child{ order:1; width:100%; justify-content:center; }
    .vastu-btn{ padding:12px 18px; font-size:14px; flex:1; }
    .vastu-canvas-tools{ gap:10px; }
    .vastu-slider-group input[type=range]{ width:100px; }
    .vastu-save-row{ flex-direction:column; align-items:stretch; }
    .vastu-input{ min-width:0; }
  }
