:root{--ink:#10251e;--muted:#68786f;--line:#d8e1dc;--paper:#fffefb;--wash:#eef3ee;--green:#123f31;--accent:#d1a94f;--danger:#a63131;--shadow:0 16px 44px #0b2a2024}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,"Noto Sans JP",system-ui,sans-serif;color:var(--ink);background:var(--wash)}body{overscroll-behavior:none}button,input,select{font:inherit}button,a{touch-action:manipulation}.hidden{display:none!important}.primary{background:var(--green);color:#fff;border-color:var(--green)}.eyebrow{display:block;font-size:10px;letter-spacing:.16em;color:#8d7440;font-weight:900}.brandmark{display:grid;place-items:center;width:42px;height:42px;background:linear-gradient(145deg,#1b5b45,#0e372a);color:#fff;border-radius:10px;font:800 23px Georgia;box-shadow:0 8px 20px #123f3130}.auth-view{min-height:100svh;display:grid;place-items:center;padding:24px}.mobile-card,.hero-card{background:var(--paper);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow)}.auth-card{width:min(420px,100%);display:grid;gap:14px;padding:28px}.auth-card h1,.mobile-header h1,.hero-card h2,.mobile-card h2{margin:3px 0;font-family:Georgia,"Yu Mincho",serif;font-weight:600}.auth-card p,.hero-card p,.mobile-card p{color:var(--muted);font-size:13px;line-height:1.6}.auth-card label{display:grid;gap:5px;color:var(--muted);font-size:12px}.auth-card input,.mobile-filters input,.mobile-filters select,.mobile-search input{width:100%;border:1px solid var(--line);border-radius:12px;padding:12px;background:#fff;outline:none}.auth-card button,.mobile-header button,.mobile-search button,.mobile-card button{border:1px solid var(--line);border-radius:12px;padding:11px 14px;background:#fff}.error{color:var(--danger);font-size:12px;min-height:18px}.mobile-app{min-height:100svh;padding:calc(env(safe-area-inset-top) + 12px) 12px calc(78px + env(safe-area-inset-bottom));}.mobile-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.mobile-header h1{font-size:27px}.mobile-header small{color:var(--muted)}.mobile-view{display:none}.mobile-view.active{display:block}.hero-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px;margin-bottom:12px;background:linear-gradient(135deg,#fffefb,#ecf4ee)}.hero-action,.quick-grid a,.work-links a{display:flex;align-items:center;justify-content:center;text-decoration:none;color:var(--green);background:#fff;border:1px solid var(--line);border-radius:14px;padding:13px;font-weight:800}.stat-grid{display:grid;grid-template-columns:1fr 1fr 1.35fr;gap:8px;margin-bottom:12px}.stat-grid article{background:#fff;border:1px solid var(--line);border-radius:16px;padding:13px}.stat-grid small{display:block;color:var(--muted);font-size:10px}.stat-grid b{display:block;margin-top:5px;font-size:18px}.quick-grid,.work-links{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}.mobile-card{padding:16px;margin-bottom:12px}.mobile-list{display:grid;gap:10px}.mobile-list.compact{gap:8px}.mobile-property{border:1px solid var(--line);border-radius:16px;background:#fff;padding:13px;text-align:left}.mobile-property h3{margin:0 0 4px;font-size:15px}.mobile-property p{margin:0;color:var(--muted);font-size:12px;line-height:1.35}.mobile-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;font-size:11px}.mobile-meta span{background:#edf3ee;border-radius:999px;padding:4px 8px}.badge-warn{background:#fff1db!important;color:#8a5a14}.badge-error{background:#f8e3e3!important;color:#a63131}.mobile-filters{position:sticky;top:0;z-index:10;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:0 0 10px;background:var(--wash)}.mobile-filters input{grid-column:1/-1}.mobile-search{position:absolute;z-index:520;left:10px;right:10px;top:10px;display:grid;grid-template-columns:1fr auto;gap:7px}.mobile-search input{box-shadow:var(--shadow)}#mobileMap{height:calc(100svh - 170px);min-height:460px;border-radius:20px;border:1px solid var(--line);overflow:hidden;background:#dfe6e2}.mobile-suggestions{position:absolute;z-index:800;left:20px;right:20px;top:132px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);max-height:46svh;overflow:auto}.mobile-suggestions button{display:block;width:100%;border:0;border-bottom:1px solid var(--line);background:#fff;text-align:left;padding:12px}.mobile-suggestions small{display:block;color:var(--muted);font-size:10px;margin-top:3px}.mobile-sheet{position:fixed;z-index:900;left:10px;right:10px;bottom:calc(74px + env(safe-area-inset-bottom));background:#fff;border:1px solid var(--line);border-radius:20px;padding:14px;box-shadow:var(--shadow)}.mobile-sheet h2{margin:0 0 4px;font-size:18px}.mobile-sheet p{margin:0;color:var(--muted);font-size:12px}.sheet-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.sheet-actions a,.sheet-actions button{border:1px solid var(--line);border-radius:12px;padding:10px;text-align:center;text-decoration:none;color:var(--green);background:#fff;font-weight:800}.bottom-nav{position:fixed;z-index:1000;left:0;right:0;bottom:0;padding:8px 10px calc(8px + env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(4,1fr);gap:8px;background:#fffefbe8;backdrop-filter:blur(14px);border-top:1px solid var(--line)}.bottom-nav button{border:0;border-radius:14px;background:transparent;padding:10px 6px;color:var(--muted);font-weight:800}.bottom-nav button.active{background:var(--green);color:#fff}.marker-pin{width:25px;height:25px;border:3px solid #fff;border-radius:50% 50% 50% 0;transform:rotate(-45deg);box-shadow:0 2px 8px #0004}.marker-pin span{display:block;transform:rotate(45deg);color:white;font-size:10px;text-align:center;margin-top:3px}.empty{color:var(--muted);text-align:center;padding:24px 8px}@media(min-width:760px){.mobile-app{max-width:720px;margin:auto}.bottom-nav{left:50%;right:auto;transform:translateX(-50%);width:min(720px,100%)}}

/* SOIRA aqua theme override */
:root{--ink:#0b2536;--muted:#557083;--line:#b9e3f5;--paper:#fafdff;--wash:#eaf8ff;--green:#0284c7;--accent:#38bdf8;--danger:#be123c;--ok:#0891b2;--warn:#d97706;--shadow:0 18px 45px #0369a11c}
html,body{background:#eaf8ff;color:var(--ink)}
header,.admin-header,.page-header{background:linear-gradient(135deg,#0284c7,#38bdf8)!important;color:#fff!important;border-color:#7dd3fc!important}
header p,.admin-header p,.page-header p,.user-label{color:#e0f7ff!important}
.brandmark,.auth-mark{background:linear-gradient(145deg,#0284c7,#7dd3fc)!important;box-shadow:0 8px 20px #0284c733!important}
button.primary,.primary,.bottom-nav button.active{background:linear-gradient(135deg,#0284c7,#0ea5e9)!important;color:#fff!important;border-color:#0284c7!important}
button,a,.button-link,.hero-action,.quick-grid a,.work-links a,.sheet-actions a,.sheet-actions button{color:#0369a1;border-color:#b9e3f5}
input:focus,select:focus,textarea:focus,.location-search>input:focus,.filters input:focus,.form-grid input:focus,.form-grid textarea:focus{border-color:#38bdf8!important;box-shadow:0 0 0 3px #38bdf833!important}
.sidebar,.card,.mobile-card,.hero-card,.status-card,.tool-panel,.detail,.mobile-sheet,.suggestions,.mobile-suggestions,dialog{background:#fafdff!important;border-color:#b9e3f5!important}
.module-tabs,.mobile-filters,.stat,.service,.diagnostic-total,.command-grid code,.mobile-meta span,.tag,.pill,.check-panel,.insight-panel{background:#eaf8ff!important}
.module-tabs button.active,.form-tabs button.active,.detail-tabs button.active{color:#0284c7!important;border-color:#38bdf8!important;box-shadow:inset 0 -3px #38bdf8!important}
.property-card:hover,.property-card.active,.mobile-property:hover{background:#e0f7ff!important}
.property-card.active:before,.detail{border-color:#38bdf8!important}
#map,#mobileMap,.print-preview{background:#dff4ff!important}
.map-toolbar button{background:#0284c7f2!important;color:#fff!important;border-color:#7dd3fc!important}
.map-toolbar button:hover{background:#7dd3fc!important;color:#083344!important}
.legend,.map-status,.bottom-nav{background:#fafdffe8!important;border-color:#b9e3f5!important}
.eyebrow,.shape-legend,.tool-panel h3,dt,.role-badge,.empty-panel b,.leaflet-control-zoom a{color:#0284c7!important}
.warning,.diagnostic-total.warn,.insight-panel.warn,.check-row.needs_check{background:#fff7ed!important}
.ok,.diagnostic-total.ok,.check-row.ok,.insight-badge{background:#e0f7ff!important;color:#0369a1!important}
pre{background:#082f49!important;color:#e0f7ff!important}

/* Mobile interaction fixes: keep map search inside the map pane so it cannot cover the header refresh button. */
.mobile-header{position:sticky!important;top:0!important;z-index:1200!important;margin:0 -12px 12px!important;padding:10px 12px!important;background:#eaf8ff!important}
#mobileRefresh{position:relative!important;z-index:1!important;min-width:76px!important}
#mobileRefresh[disabled]{opacity:.72!important;pointer-events:none!important}
#viewMap{position:relative!important}
.mobile-search{position:absolute!important;left:10px!important;right:10px!important;top:10px!important;z-index:520!important;grid-template-columns:minmax(0,1fr) auto auto!important}
#mobilePlanningLayer[disabled]{opacity:.7}
.mobile-suggestions{position:absolute!important;left:10px!important;right:10px!important;top:62px!important;z-index:800!important;max-height:min(46svh,360px)!important}
#mobileMap{height:calc(100svh - 182px)!important;min-height:420px!important}
.mobile-filters{top:76px!important}
@media(max-width:430px){
  .mobile-header h1{font-size:23px!important}
  .mobile-header button{padding:10px 12px!important}
  .stat-grid{grid-template-columns:1fr 1fr!important}
  .stat-grid article:last-child{grid-column:1/-1!important}
}
.marker-pin.marker-simple{width:24px;height:24px;border:3px solid #fff!important;border-radius:50% 50% 50% 0!important;transform:rotate(-45deg)!important;box-shadow:0 6px 14px #082f4955,0 0 0 1px #082f4922}
.marker-pin.marker-simple span{display:none!important}
.marker-pin.marker-simple:after{content:"";position:absolute;left:7px;top:7px;width:5px;height:5px;border-radius:50%;background:#fff;box-shadow:0 0 0 1px #0001}
.marker-pin.marker-detailed{width:30px;height:30px;border-width:3px;box-shadow:0 5px 14px #082f4966}
.mobile-search button{background:#fafdfff2!important;color:#0369a1!important;border-color:#b9e3f5!important;box-shadow:0 6px 16px #0369a11c!important;white-space:nowrap}
.leaflet-control-zoom a{background:#fafdfff2!important;border-color:#b9e3f5!important;color:#0369a1!important}

/* Mobile stability: keep tappable UI above Leaflet panes and reduce accidental map capture. */
.mobile-app{position:relative!important}
.mobile-header,.bottom-nav,.mobile-card,.hero-card,.stat-grid,.quick-grid,.work-links,.mobile-filters,.mobile-list{position:relative!important;z-index:1100!important}
#viewMap{z-index:1!important}
#mobileMap{touch-action:pan-x pan-y!important;will-change:transform}
.mobile-search,.mobile-suggestions,.mobile-sheet{pointer-events:auto!important}
.mobile-search input,.mobile-search button,.bottom-nav button,.quick-grid a,.work-links a,.hero-action,#mobileRefresh{min-height:44px!important}
.bottom-nav{z-index:2400!important;box-shadow:0 -10px 26px #0369a118!important}
.mobile-sheet{z-index:2300!important;max-height:min(46svh,420px)!important;overflow:auto!important}
.sheet-close{position:absolute!important;right:10px!important;top:10px!important;width:40px!important;height:40px!important;border-radius:999px!important;display:grid!important;place-items:center!important;padding:0!important;font-size:24px!important}
.mobile-sheet h2{padding-right:44px!important}

/* Mobile login should not show app content behind it. */
.auth-view{background:#fff}

/* Premium aqua mobile polish: same controls, sharper hierarchy and calmer contrast. */
:root{
  --ink:#082033;
  --muted:#506f82;
  --line:#a9dff5;
  --paper:#fbfeff;
  --wash:#eaf8ff;
  --green:#027db8;
  --accent:#72d7f7;
  --gold:#d9b65f;
  --shadow:0 16px 40px #06476f20;
}
html,body{background:linear-gradient(180deg,#eaf8ff 0,#f8fdff 100%)!important}
.auth-card,.mobile-card,.hero-card,.mobile-property,.mobile-sheet{
  background:rgba(251,254,255,.96)!important;
  border-color:#aee2f6!important;
  box-shadow:0 16px 38px rgba(5,69,106,.14)!important;
}
.brandmark{
  background:linear-gradient(145deg,#ffffff,#dff7ff)!important;
  color:#0369a1!important;
  border:1px solid rgba(255,255,255,.9)!important;
  box-shadow:0 10px 22px rgba(3,105,161,.18),inset 0 1px 0 rgba(255,255,255,.95)!important;
}
.mobile-header{
  background:linear-gradient(180deg,#eaf8ff,#f7fcff)!important;
  border-bottom:1px solid rgba(169,223,245,.65);
  box-shadow:0 10px 28px rgba(5,69,106,.08);
}
.mobile-header h1{color:#082033!important;letter-spacing:.01em}
.mobile-header small{color:#5b7b8e!important}
.mobile-header button,#mobileRefresh,.mobile-search button,.auth-card button,.mobile-card button{
  border-radius:8px!important;
  border-color:#aee2f6!important;
  background:linear-gradient(180deg,#ffffff,#f0fbff)!important;
  color:#0369a1!important;
  box-shadow:0 6px 16px rgba(3,105,161,.12)!important;
  font-weight:900;
}
.primary,.auth-card button.primary,.bottom-nav button.active{
  background:linear-gradient(135deg,#026fa8,#0ea5e9 64%,#67d7f6)!important;
  color:#fff!important;
  border-color:#14a9df!important;
  box-shadow:0 12px 28px rgba(2,132,199,.26)!important;
}
.hero-card{
  background:linear-gradient(135deg,#fbfeff 0,#e7f8ff 100%)!important;
}
.hero-action,.quick-grid a,.work-links a{
  border-radius:8px!important;
  background:linear-gradient(180deg,#ffffff,#f2fbff)!important;
  color:#0369a1!important;
  border-color:#aee2f6!important;
}
.stat-grid article{
  background:#fbfeff!important;
  border-color:#bce8f8!important;
  border-radius:8px!important;
  box-shadow:0 8px 20px rgba(5,69,106,.08);
}
.stat-grid b{color:#053c60}
.mobile-filters{
  background:linear-gradient(180deg,#eaf8ff,#f8fdff)!important;
}
.auth-card input,.mobile-filters input,.mobile-filters select,.mobile-search input{
  border-color:#aee2f6!important;
  border-radius:8px!important;
  background:#fff!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95);
}
.mobile-property{
  border-radius:8px!important;
  transition:background .12s ease,box-shadow .12s ease;
}
.mobile-property:hover{
  background:#eefaff!important;
  box-shadow:inset 4px 0 0 #72d7f7,0 14px 34px rgba(5,69,106,.12)!important;
}
.mobile-meta span{
  background:#ecf9ff!important;
  color:#0369a1!important;
  border:1px solid #c3eafa;
  font-weight:900;
}
#mobileMap{
  border-color:#aee2f6!important;
  border-radius:8px!important;
  box-shadow:0 16px 38px rgba(5,69,106,.14)!important;
}
.mobile-search input{
  box-shadow:0 10px 24px rgba(5,69,106,.16)!important;
}
.mobile-sheet{border-radius:10px!important}
.bottom-nav{
  background:rgba(251,254,255,.92)!important;
  border-color:#aee2f6!important;
  box-shadow:0 -14px 34px rgba(5,69,106,.14)!important;
  backdrop-filter:blur(14px) saturate(1.05);
}
.bottom-nav button{
  border-radius:8px!important;
  color:#59798c!important;
}
.bottom-nav button.active{color:#fff!important}
.sheet-actions a,.sheet-actions button{
  border-radius:8px!important;
  border-color:#aee2f6!important;
  background:linear-gradient(180deg,#ffffff,#f2fbff)!important;
  color:#0369a1!important;
}
.eyebrow{color:#027db8!important;letter-spacing:.22em}

/* Compact premium pins and readable pale-map contrast on mobile. */
#mobileMap .leaflet-tile-pane img{
  filter:saturate(1.08) contrast(1.08) brightness(.98)!important;
}
.marker-pin{
  border-width:2.5px!important;
  border-color:rgba(255,255,255,.96)!important;
  box-shadow:0 5px 12px rgba(5,45,70,.26),0 0 0 1px rgba(6,58,91,.16),inset 0 1px 0 rgba(255,255,255,.38)!important;
  opacity:.94!important;
}
.marker-pin::before{
  content:"";
  position:absolute;
  inset:3px 3px auto auto;
  width:34%;
  height:34%;
  border-radius:999px;
  background:rgba(255,255,255,.34);
  pointer-events:none;
}
.marker-pin.marker-simple{
  width:18px!important;
  height:18px!important;
  border-radius:999px!important;
  transform:none!important;
}
.marker-pin.marker-simple::after{
  left:50%!important;
  top:50%!important;
  width:4px!important;
  height:4px!important;
  transform:translate(-50%,-50%)!important;
}
.marker-pin.marker-detailed{
  width:24px!important;
  height:24px!important;
  box-shadow:0 6px 14px rgba(5,45,70,.30),0 0 0 1px rgba(6,58,91,.16),inset 0 1px 0 rgba(255,255,255,.38)!important;
}

/* Mobile readability pass: stronger contrast for outdoor use while keeping the same workflow. */
@media(max-width:759px){
  html,body{
    background:#f2fbff!important;
  }
  .mobile-app{
    padding:0 10px calc(86px + env(safe-area-inset-bottom))!important;
    background:#f2fbff!important;
  }
  .mobile-header{
    margin:0 -10px 12px!important;
    padding:calc(env(safe-area-inset-top) + 10px) 12px 12px!important;
    background:linear-gradient(135deg,#063a5b 0%,#027db8 62%,#2bc2e7 100%)!important;
    border-bottom:1px solid rgba(255,255,255,.24)!important;
    box-shadow:0 10px 26px rgba(5,60,96,.24)!important;
  }
  .mobile-header .eyebrow{
    color:#dff7ff!important;
    font-size:10px!important;
  }
  .mobile-header h1{
    color:#fff!important;
    font-size:24px!important;
    line-height:1.12!important;
    margin-top:2px!important;
  }
  .mobile-header small{
    color:#dff7ff!important;
    font-size:12px!important;
    font-weight:800!important;
  }
  #mobileRefresh{
    min-width:74px!important;
    min-height:44px!important;
    background:#ffffff!important;
    border-color:rgba(255,255,255,.82)!important;
    color:#035d8f!important;
    box-shadow:0 8px 18px rgba(3,58,91,.18)!important;
  }
  .hero-card,.mobile-card,.mobile-property,.stat-grid article{
    background:#ffffff!important;
    border:1.5px solid #96d9f2!important;
    border-radius:10px!important;
    box-shadow:0 10px 24px rgba(5,69,106,.12)!important;
  }
  .hero-card,.mobile-card{
    padding:14px!important;
    margin-bottom:10px!important;
  }
  .hero-card{
    align-items:stretch!important;
    background:linear-gradient(135deg,#ffffff 0%,#e9f9ff 100%)!important;
  }
  .hero-card h2,.mobile-card h2{
    font-size:21px!important;
    line-height:1.2!important;
    color:#071e30!important;
  }
  .hero-card p,.mobile-card p{
    font-size:13px!important;
    color:#385a70!important;
    line-height:1.55!important;
  }
  .hero-action,.quick-grid a,.work-links a{
    min-height:48px!important;
    border:1.5px solid #96d9f2!important;
    border-radius:10px!important;
    color:#035d8f!important;
    font-size:15px!important;
    box-shadow:0 7px 16px rgba(5,69,106,.10)!important;
  }
  .stat-grid{
    gap:8px!important;
    margin-bottom:10px!important;
  }
  .stat-grid article{
    padding:12px!important;
  }
  .stat-grid small{
    color:#42677d!important;
    font-size:11px!important;
    font-weight:900!important;
  }
  .stat-grid b{
    color:#06263d!important;
    font-size:20px!important;
    line-height:1.15!important;
  }
  .mobile-filters{
    top:72px!important;
    margin:0 -10px 10px!important;
    padding:10px!important;
    background:#f2fbff!important;
    border-bottom:1px solid #b7e7f8!important;
    box-shadow:0 8px 18px rgba(5,69,106,.08)!important;
  }
  .auth-card input,.mobile-filters input,.mobile-filters select,.mobile-search input{
    min-height:48px!important;
    border:1.5px solid #96d9f2!important;
    color:#071e30!important;
    font-size:16px!important;
    border-radius:10px!important;
  }
  .mobile-filters input::placeholder,.mobile-search input::placeholder{
    color:#6d8797!important;
  }
  .mobile-property{
    padding:14px!important;
  }
  .mobile-property h3{
    color:#071e30!important;
    font-size:16px!important;
    line-height:1.35!important;
    margin-bottom:6px!important;
  }
  .mobile-property p{
    color:#42677d!important;
    font-size:13px!important;
    line-height:1.45!important;
  }
  .mobile-meta{
    gap:5px!important;
    font-size:12px!important;
  }
  .mobile-meta span{
    background:#e8f8ff!important;
    border-color:#abe2f6!important;
    color:#035d8f!important;
    padding:5px 8px!important;
  }
  .mobile-search{
    grid-template-columns:1fr 1fr!important;
    gap:7px!important;
    top:8px!important;
  }
  .mobile-search input{
    grid-column:1/-1!important;
    box-shadow:0 8px 20px rgba(5,69,106,.18)!important;
  }
  .mobile-search button{
    min-height:42px!important;
    padding:9px 8px!important;
    border:1.5px solid #96d9f2!important;
    border-radius:10px!important;
    background:#ffffff!important;
    color:#035d8f!important;
    font-size:13px!important;
  }
  .mobile-suggestions{
    top:112px!important;
    border:1.5px solid #96d9f2!important;
    border-radius:10px!important;
  }
  #mobileMap{
    height:calc(100svh - 200px)!important;
    min-height:390px!important;
    border:1.5px solid #96d9f2!important;
    box-shadow:0 10px 24px rgba(5,69,106,.12)!important;
  }
  .mobile-sheet{
    left:8px!important;
    right:8px!important;
    bottom:calc(82px + env(safe-area-inset-bottom))!important;
    border:1.5px solid #96d9f2!important;
    border-radius:12px!important;
    padding:14px!important;
    background:#ffffff!important;
  }
  .mobile-sheet h2{
    color:#071e30!important;
    font-size:20px!important;
    line-height:1.25!important;
  }
  .mobile-sheet p{
    color:#385a70!important;
    font-size:13px!important;
    line-height:1.5!important;
  }
  .bottom-nav{
    padding:8px 8px calc(8px + env(safe-area-inset-bottom))!important;
    background:#ffffff!important;
    border-top:1.5px solid #96d9f2!important;
    box-shadow:0 -12px 28px rgba(5,69,106,.18)!important;
  }
  .bottom-nav button{
    min-height:50px!important;
    color:#385a70!important;
    font-size:13px!important;
    font-weight:950!important;
    border-radius:10px!important;
  }
  .bottom-nav button.active{
    background:linear-gradient(135deg,#063a5b,#0b95ce 75%,#44caea)!important;
    color:#fff!important;
    box-shadow:0 9px 20px rgba(3,105,161,.24)!important;
  }
}
