:root{
  --bg:#f5f3ee;
  --paper:rgba(255,255,255,.76);
  --paper-solid:#fff;
  --text:#18201d;
  --muted:#6b736f;
  --line:rgba(24,32,29,.10);
  --accent:#235347;
  --accent-2:#dcebe4;
  --shadow:0 18px 50px rgba(42,50,46,.10);
  --radius:28px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:radial-gradient(circle at 80% 0%,#e5eee8 0,transparent 34%),var(--bg);color:var(--text);font-family:Inter,Arial,Tahoma,system-ui,sans-serif;-webkit-font-smoothing:antialiased}
button,textarea{font:inherit}
button,a{-webkit-tap-highlight-color:transparent}
a{color:inherit;text-decoration:none}
.page-shell{max-width:1020px;margin:0 auto;padding:0 28px}
.topbar{height:88px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:10px;font-weight:700}
.brand-mark{display:grid;place-items:center;width:40px;height:40px;border-radius:13px;background:var(--text);color:#fff;font-size:14px;letter-spacing:-.4px}
.brand-text{font-size:14px;letter-spacing:-.2px}
.tool-name{font-size:13px;color:var(--muted);padding:8px 12px;border:1px solid var(--line);border-radius:999px;background:rgba(255,255,255,.45)}
.hero{padding:86px 0 40px;max-width:820px;margin:auto;text-align:center}
.eyebrow{text-transform:uppercase;letter-spacing:.14em;font-size:11px;font-weight:800;color:var(--accent);margin-bottom:14px}
h1{font-size:clamp(42px,7.3vw,78px);line-height:.98;letter-spacing:-.065em;margin:0;font-weight:800}
h1 span{color:var(--accent)}
.lead{font-size:18px;line-height:1.65;color:var(--muted);max-width:650px;margin:26px auto 34px}
.search-card{text-align:left;background:var(--paper);backdrop-filter:blur(18px);border:1px solid rgba(255,255,255,.9);box-shadow:var(--shadow);border-radius:var(--radius);padding:22px}
.search-card label{display:block;font-size:12px;font-weight:700;margin:0 0 9px 2px}
.input-wrap{position:relative}
textarea{width:100%;min-height:112px;resize:vertical;border:1px solid var(--line);border-radius:18px;padding:18px 46px 18px 18px;background:rgba(255,255,255,.82);color:var(--text);outline:none;font-size:17px;line-height:1.5;transition:.2s ease}
textarea:focus{border-color:rgba(35,83,71,.42);box-shadow:0 0 0 4px rgba(35,83,71,.08)}
textarea::placeholder{color:#969d99}
.clear-btn{position:absolute;right:12px;top:12px;width:32px;height:32px;border:0;border-radius:50%;background:#eef0ed;color:#6d7571;cursor:pointer;font-size:22px;line-height:1}
.form-actions{display:flex;gap:10px;margin-top:12px}
.primary-btn,.ghost-btn,.driver-btn,.map-btn{border:0;border-radius:16px;min-height:54px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:transform .15s ease,box-shadow .15s ease,background .15s ease}
.primary-btn{background:var(--text);color:white;padding:0 22px;font-weight:700;min-width:150px}
.primary-btn:hover,.driver-btn:hover,.map-btn:hover{transform:translateY(-1px)}
.ghost-btn{background:#eef0ed;color:var(--text);padding:0 19px;font-weight:600}
.hint{font-size:12px;color:var(--muted);margin:12px 4px 0}
.spinner{display:none;width:18px;height:18px;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite}
.is-loading .spinner{display:block}.is-loading .btn-text{display:none}@keyframes spin{to{transform:rotate(360deg)}}
.result-section{padding:42px 0 10px}
.result-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:18px}
.result-head .eyebrow{margin-bottom:7px}.result-head h2{font-size:32px;letter-spacing:-.04em;margin:0}
.provider-badge{font-size:11px;color:var(--muted);padding:8px 11px;border:1px solid var(--line);border-radius:999px;background:rgba(255,255,255,.54)}
.address-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.address-card{background:var(--paper-solid);border:1px solid var(--line);border-radius:22px;padding:18px 18px 22px;min-height:178px;box-shadow:0 8px 28px rgba(30,38,34,.05)}
.thai-card{background:linear-gradient(155deg,#eff8f3 0,#fff 75%)}
.card-topline{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}
.lang{display:grid;place-items:center;width:34px;height:28px;border-radius:9px;background:#edf0ed;font-size:10px;font-weight:800;letter-spacing:.08em}
.copy-mini{border:0;background:transparent;color:var(--accent);font-weight:700;font-size:12px;cursor:pointer;padding:8px}
.address-text{font-size:17px;line-height:1.55;letter-spacing:-.015em;word-break:break-word}.thai-text{font-family:Tahoma,Arial,system-ui,sans-serif;font-size:19px;line-height:1.7}
.main-actions{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}
.driver-btn,.map-btn{justify-content:flex-start;text-align:left;padding:15px 18px;gap:14px;min-height:76px}
.driver-btn{background:var(--text);color:#fff}.map-btn{background:var(--accent-2);color:var(--text)}
.action-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;background:rgba(255,255,255,.13);font-size:20px;flex:0 0 auto}
.map-btn .action-icon{background:rgba(255,255,255,.6)}
.main-actions strong{display:block;font-size:14px}.main-actions small{display:block;font-size:11px;margin-top:4px;opacity:.65}
.coords-row{display:flex;gap:10px;align-items:center;justify-content:center;padding:16px;color:var(--muted);font-size:11px}
.coords-row button{border:0;background:transparent;color:var(--accent);cursor:pointer;font-weight:700;font-size:11px}.google-attribution{font-family:Roboto,Arial,sans-serif;font-style:normal;font-weight:400;font-size:12px;letter-spacing:normal;white-space:nowrap;color:#5e5e5e;text-align:right;padding:0 3px 4px}
.recent-section{padding:46px 0 8px}.section-title-row{display:flex;align-items:center;justify-content:space-between}.section-title-row h3{margin:0;font-size:18px}.section-title-row button{border:0;background:transparent;color:var(--muted);font-size:12px;cursor:pointer}
.recent-list{display:grid;gap:8px;margin-top:12px}.recent-item{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;text-align:left;background:rgba(255,255,255,.62);border:1px solid var(--line);border-radius:15px;padding:13px 15px;cursor:pointer}.recent-item:hover{background:white}.recent-item strong{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.recent-item small{display:block;color:var(--muted);font-size:10px;margin-top:3px}.recent-arrow{font-size:18px;color:#929995}
.why-card{margin:54px 0 64px;padding:25px;border-radius:24px;background:rgba(255,255,255,.5);border:1px solid var(--line);display:grid;grid-template-columns:auto 1fr;gap:20px;align-items:start}.why-icon{font-family:Tahoma,Arial,system-ui,sans-serif;padding:12px 14px;border-radius:14px;background:white;font-weight:700;color:var(--accent)}.why-card h3{margin:2px 0 7px;font-size:17px}.why-card p{margin:0;color:var(--muted);font-size:13px;line-height:1.65}
footer{border-top:1px solid var(--line);min-height:100px;padding:25px 0;display:flex;align-items:flex-start;justify-content:space-between;color:var(--muted);font-size:11px}.footer-links{display:flex;gap:7px}footer strong{color:var(--text)}
.toast{position:fixed;z-index:40;left:50%;bottom:24px;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:#17201d;color:#fff;border-radius:999px;padding:11px 16px;font-size:12px;font-weight:600;transition:.2s ease;box-shadow:0 10px 34px rgba(0,0,0,.2)}.toast.show{opacity:1;transform:translate(-50%,0)}
.modal{position:fixed;inset:0;z-index:30;display:grid;place-items:end center;padding:24px}.modal[hidden]{display:none}.modal-backdrop{position:absolute;inset:0;background:rgba(12,17,15,.55);backdrop-filter:blur(8px)}.driver-sheet{position:relative;width:min(760px,100%);background:#fff;border-radius:30px;padding:28px;box-shadow:0 24px 90px rgba(0,0,0,.28);max-height:90vh;overflow:auto}.driver-sheet-top{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.driver-kicker{font-family:Tahoma,Arial,system-ui,sans-serif;color:var(--accent);font-size:13px;font-weight:600;margin-bottom:5px}.driver-sheet h2{margin:0;font-size:22px}.modal-close{width:42px;height:42px;border:0;border-radius:50%;background:#eef0ed;cursor:pointer;font-size:25px;color:#5d6661}.driver-thai{font-family:Tahoma,Arial,system-ui,sans-serif;font-size:clamp(28px,6vw,48px);line-height:1.55;font-weight:600;letter-spacing:-.02em;padding:42px 0 28px}.driver-english{color:var(--muted);font-size:14px;line-height:1.6;padding-bottom:24px;border-bottom:1px solid var(--line)}.driver-actions{display:flex;gap:10px;padding-top:18px}.as-link{display:inline-flex}.driver-actions .ghost-btn{min-height:54px}
@media(max-width:720px){.page-shell{padding:0 16px}.topbar{height:72px}.brand-text{display:none}.hero{padding:58px 0 28px}.lead{font-size:15px;margin-top:20px}.search-card{padding:14px;border-radius:22px}.address-grid,.main-actions{grid-template-columns:1fr}.result-head{align-items:flex-start;flex-direction:column}.result-head h2{font-size:28px}.address-card{min-height:auto}.why-card{grid-template-columns:1fr;gap:12px}.modal{padding:0;place-items:end}.driver-sheet{border-radius:28px 28px 0 0;padding:22px 18px 26px;max-height:92vh}.driver-actions{flex-direction:column}.driver-actions>*{width:100%}footer{flex-direction:column;gap:10px}.form-actions{display:grid;grid-template-columns:1fr auto}.primary-btn{min-width:0}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
.legal-page{max-width:760px;margin:0 auto;padding:70px 0 60px}.legal-page h1{font-size:clamp(40px,7vw,64px);margin-bottom:32px}.legal-page h2{font-size:19px;margin:34px 0 8px;letter-spacing:-.02em}.legal-page p{color:var(--muted);font-size:15px;line-height:1.75}.legal-link{color:var(--accent);text-decoration:underline;text-underline-offset:3px}

/* v1.1 — disambiguation for chains and same-name places */
.candidates-section{padding:42px 0 4px;scroll-margin-top:18px}
.candidates-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:16px}
.candidates-head .eyebrow{margin-bottom:7px}.candidates-head h2{font-size:30px;letter-spacing:-.04em;margin:0}.candidates-head p{margin:8px 0 0;color:var(--muted);font-size:13px;line-height:1.55}
.candidate-count{flex:0 0 auto;font-size:11px;color:var(--muted);padding:8px 11px;border:1px solid var(--line);border-radius:999px;background:rgba(255,255,255,.54)}
.candidates-list{display:grid;gap:9px}
.candidate-item{width:100%;display:grid;grid-template-columns:38px minmax(0,1fr) 24px;align-items:center;gap:12px;text-align:left;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.78);padding:13px 14px;cursor:pointer;color:var(--text);transition:transform .15s ease,background .15s ease,border-color .15s ease;box-shadow:0 7px 24px rgba(30,38,34,.035)}
.candidate-item:hover{transform:translateY(-1px);background:#fff;border-color:rgba(35,83,71,.28)}
.candidate-number{display:grid;place-items:center;width:36px;height:36px;border-radius:12px;background:#eef0ed;color:var(--accent);font-size:12px;font-weight:800}
.candidate-text{min-width:0}.candidate-text strong{display:block;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.candidate-text small{display:block;margin-top:4px;color:var(--muted);font-size:11px;line-height:1.45;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.candidate-arrow{font-size:22px;color:#929995;text-align:center}
.candidates-section .google-attribution{margin-top:8px}
@media(max-width:720px){.candidates-head{align-items:flex-start;flex-direction:column}.candidates-head h2{font-size:27px}.candidate-count{display:none}.candidate-item{grid-template-columns:34px minmax(0,1fr) 20px;padding:12px}.candidate-number{width:32px;height:32px;border-radius:10px}.candidate-text strong,.candidate-text small{white-space:normal}.candidates-section{padding-top:30px}}

/* v1.2 — nearby search + richer search state */
.nearby-btn{border:1px solid rgba(35,83,71,.14);border-radius:16px;min-height:54px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 18px;background:#e7f0eb;color:var(--accent);font-weight:700;cursor:pointer;transition:transform .15s ease,background .15s ease,border-color .15s ease,box-shadow .15s ease}
.nearby-btn:hover{transform:translateY(-1px);background:#deebe4;border-color:rgba(35,83,71,.24)}
.nearby-btn:disabled{cursor:wait;opacity:.72;transform:none}
.nearby-btn.is-active{background:var(--accent);color:#fff;border-color:var(--accent);box-shadow:0 8px 24px rgba(35,83,71,.18)}
.nearby-icon{font-size:18px;line-height:1;transform:translateY(-1px)}
.nearby-btn.is-locating .nearby-icon{animation:nearbyPulse .9s ease-in-out infinite alternate}
@keyframes nearbyPulse{from{opacity:.4;transform:scale(.88)}to{opacity:1;transform:scale(1.08)}}
.location-status{margin:11px 4px 0;padding:9px 11px;border-radius:12px;background:rgba(35,83,71,.07);color:var(--accent);font-size:11px;font-weight:650;line-height:1.45}
.candidate-distance{display:inline-flex;align-items:center;margin-top:6px;padding:4px 7px;border-radius:8px;background:#edf4f0;color:var(--accent);font-size:10px;font-weight:750;line-height:1}

@media(max-width:720px){
  .form-actions{grid-template-columns:1fr 1fr}
  .form-actions .primary-btn{grid-column:1/-1;width:100%}
  .form-actions .nearby-btn,.form-actions .ghost-btn{width:100%;padding:0 12px}
  .location-status{margin-top:10px}
}
