
/* Match2Go reference redesign v2 — strong structural visual layer */
:root{
  --ref-blue:#1677f2;
  --ref-blue2:#3159df;
  --ref-ink:#102b49;
  --ref-text:#46617c;
  --ref-glass:rgba(255,255,255,.94);
  --ref-line:rgba(199,218,239,.9);
  --ref-shadow:0 18px 48px rgba(22,63,108,.18);
  --ref-soft-shadow:0 8px 28px rgba(22,63,108,.12);
}
body>header{
  height:58px!important;
  min-height:58px!important;
  padding:0 14px!important;
  border-bottom:0!important;
  background:rgba(247,251,255,.92)!important;
  box-shadow:0 1px 0 rgba(193,213,235,.62)!important;
  backdrop-filter:blur(20px) saturate(1.2);
}
body>header .brand{
  font-size:23px!important;
  font-weight:900!important;
  letter-spacing:-1.25px!important;
}
body>header .subtitle{
  color:#7890a8!important;
  font-size:11px!important;
  font-weight:650!important;
  letter-spacing:.02em;
}
body>header #notifications,
body>header #profile{
  border:0!important;
  background:rgba(255,255,255,.96)!important;
  box-shadow:0 4px 16px rgba(25,62,104,.09)!important;
}
body>header #profile{
  min-width:40px;
  height:40px;
  padding:0 13px!important;
  font-size:12px!important;
  border-radius:999px!important;
}

main.map-first-main{
  height:calc(100dvh - 58px - var(--map-bottom))!important;
  background:#eaf3fb;
}
.map-first-main .map-layout{
  inset:0!important;
}
.map-primary-intent{
  position:absolute;
  z-index:12;
  top:14px;
  left:50%;
  width:min(560px,calc(100% - 28px));
  min-height:72px;
  transform:translateX(-50%);
  display:grid;
  grid-template-columns:46px minmax(0,1fr) 24px;
  align-items:center;
  gap:12px;
  padding:10px 15px 10px 11px;
  margin:0;
  border:1px solid rgba(196,217,240,.95);
  border-radius:22px;
  background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(244,249,255,.96));
  color:var(--ref-ink);
  text-align:left;
  box-shadow:0 18px 48px rgba(15,56,103,.20),0 2px 5px rgba(15,56,103,.06);
  backdrop-filter:blur(18px) saturate(1.18);
  transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}
.map-primary-intent:hover{
  transform:translateX(-50%) translateY(-2px);
  border-color:#a9cef7;
  box-shadow:0 22px 56px rgba(15,56,103,.24);
}
.map-primary-intent:focus-visible{
  outline:3px solid rgba(23,119,242,.28);
  outline-offset:3px;
}
.map-primary-icon{
  width:46px;height:46px;border-radius:16px;
  display:grid;place-items:center;
  color:#fff;
  font-size:27px;font-weight:500;line-height:1;
  background:linear-gradient(145deg,var(--ref-blue),var(--ref-blue2));
  box-shadow:0 9px 20px rgba(31,99,220,.27);
}
.map-primary-copy{min-width:0;display:flex;flex-direction:column;gap:3px}
.map-primary-copy strong{
  display:block;
  font-size:16px;line-height:1.18;font-weight:830;letter-spacing:-.35px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.map-primary-copy small{
  display:block;
  font-size:11px;line-height:1.25;font-weight:620;color:#7790a8;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.map-primary-arrow{
  font-size:30px;font-weight:300;color:#7492b2;line-height:1;
}

/* Controls form a light secondary row under the intent control */
.map-action-bar{
  top:96px!important;
  left:50%!important;
  right:auto!important;
  width:min(560px,calc(100% - 28px));
  transform:translateX(-50%);
  justify-content:center!important;
  gap:7px!important;
}
.map-action-bar>a,
.map-action-bar>button,
.map-action-bar>details>summary{
  min-height:38px!important;
  padding:7px 11px!important;
  border-radius:999px!important;
  border:1px solid rgba(199,218,239,.92)!important;
  background:rgba(255,255,255,.93)!important;
  color:#365a7c!important;
  font-size:11px!important;
  font-weight:720!important;
  box-shadow:0 7px 19px rgba(21,61,104,.10)!important;
  backdrop-filter:blur(14px);
}
.map-action-bar .m2g-icon{width:15px!important;height:15px!important}
.map-filter-body{
  top:48px!important;
  border-radius:24px!important;
  border:1px solid #d4e4f4!important;
  background:rgba(255,255,255,.98)!important;
  box-shadow:0 26px 75px rgba(16,49,87,.22)!important;
}

/* The map becomes visually calmer behind floating UI */
.map-first-main .map-shell{
  background:linear-gradient(180deg,#eaf3fb,#e8f1f8)!important;
}
.maplibregl-ctrl-group{
  border-radius:14px!important;
  overflow:hidden;
  box-shadow:0 8px 22px rgba(22,62,105,.13)!important;
}
.maplibregl-ctrl-group button{
  width:36px!important;height:36px!important;
}
.map-marker{
  filter:drop-shadow(0 8px 12px rgba(18,59,103,.24))!important;
}
.map-marker button{
  border:3px solid #fff!important;
  box-shadow:0 0 0 1px rgba(132,178,225,.5),0 8px 18px rgba(18,59,103,.20)!important;
}
.map-marker .marker-caption{
  background:rgba(255,255,255,.96)!important;
  border:1px solid #d9e7f5!important;
  color:#254a6d!important;
  box-shadow:0 6px 18px rgba(18,59,103,.11)!important;
}

/* Nearby content feels like a real product card rather than a utility panel */
.map-first-main .map-layout aside#nearby-sheet{
  border:1px solid rgba(204,222,241,.95)!important;
  border-radius:25px!important;
  background:rgba(255,255,255,.96)!important;
  box-shadow:0 20px 55px rgba(14,52,94,.20)!important;
  backdrop-filter:blur(20px) saturate(1.1);
}
.nearby-sheet-eyebrow{
  color:#5b82aa!important;
  letter-spacing:1.6px!important;
  font-size:9px!important;
}
#nearby-sheet #status{
  font-size:17px!important;
  font-weight:830!important;
  letter-spacing:-.2px;
}
#nearby-sheet #list button.nearby-list-item{
  min-height:76px!important;
  padding:13px 7px!important;
  border-radius:14px!important;
  border-bottom:0!important;
  margin:3px 0!important;
  transition:background .17s ease,transform .17s ease,box-shadow .17s ease!important;
}
#nearby-sheet #list button.nearby-list-item:is(:hover,:focus-visible),
#nearby-sheet #list button.nearby-list-item.is-selected{
  background:linear-gradient(145deg,#f1f7ff,#f8fbff)!important;
  transform:translateX(2px);
  box-shadow:inset 0 0 0 1px #e0ebf6!important;
}
#nearby-sheet #card h2{
  font-size:23px!important;
  letter-spacing:-.65px!important;
  line-height:1.16!important;
}
#nearby-sheet #card-actions .m2g-action-primary{
  border:0!important;
  background:linear-gradient(135deg,var(--ref-blue),var(--ref-blue2))!important;
  box-shadow:0 10px 24px rgba(31,99,220,.23)!important;
}

/* Bottom dock from the reference: floating, central action raised */
body>.bottom{
  left:12px!important;
  right:12px!important;
  bottom:max(10px,env(safe-area-inset-bottom))!important;
  width:auto!important;
  max-width:570px!important;
  height:70px!important;
  min-height:7ppx!important;
  max-height:70px!important;
  margin:0 auto!important;
  padding:6px 8px!important;
  border:1px solid rgba(199,218,239,.92)!important;
  border-radius:25px!important;
  background:rgba(255,255,255,.94)!important;
  box-shadow:0 20px 50px rgba(13,48,90,.21)!important;
  backdrop-filter:blur(22px) saturate(1.2)!important;
  overfow:visible!important;
}
body>.bottom :is(a,button){
  min-height:56px!important;
  border-radius:17px!important;
  color:#748ba3!important;
  font-weight:680!important;
}
body>.bottom a[aria-current="page"]{
  color:#176ee0!important;
  background:#edf5ff!important;
}
body>.bottom #create{
  width:62px!important;
  height:62px!important;
  min-height:62px!important;
  margin:-17px auto 0!important;
  align-self:start!important;
  border:5px solid #f7fbff!important;
  border-radius:50%!important;
  color:#fff!important;
  background:linear-gradient(145deg,#1686fb,#3154df)!important;
  box-shadow:0 12px 29px rgba(26,91,211,.36)!important;
  transform:none!important;
}
body>.bottom #create .m2g-icon{
  width:25px!important;height:25px!important;
}
body>.bottom #create span{
  position:absolute;
  top:64px;
  color:#55708b!important;
  font-size:9px!important;
  font-weight:750!important;
  white-space:nowrap;
}
body>.bottom .m2g-icon{width:21px!important;height:21px!important}

/* Modals now read as cards from the same system */
dialog{
  border:1px solid #d8e6f4!important;
  border-radius:28px!important;
  background:rgba(255,255,255,.99)!important;
  box-shadow:0 35px 100px rgba(9,39,75,.29)!important;
}
.panel-head h2{
  font-size:24px!important;
  font-weight:850!important;
  letter-spacing:-.6px!important;
}
#panel-body :is(input,textarea,select){
  min-height:45px;
  border-radius:15px!important;
  border-color:#d5e4f2!important;
  background:#fbfdff!important;
}
#panel-body .primary,#panel-body button.primary{
  min-height:48px;
  border:0!important;
  border-radius:15px!important;
  background:linear-gradient(135deg,var(--ref-blue),var(--ref-blue2))!important;
  box-shadow:0 9px 22px rgba(31,99,220,.22)!important;
}

/* Notifications fit below the two floating rows */
.map-first-main #notice:not([hidden]){
  top:146px!important;
  width:min(560px,calc(100% - 28px));
  left:50%!important;right:auto!important;
  transform:translateX(-50%);
  border-radius:17px!important;
}

/* Desktop gives the map breathing room and places detail card like the reference */
@media(min-width:701px){
  .map-primary-intent{left:30px;transform:none;width:430px}
  .map-primary-intent:hover{transform:translateY(-2px)}
  .map-action-bar{left:30px!important;transform:none;width:430px;justify-content:flex-start!important}
  .map-first-main .map-layout aside#nearby-sheet{right:24px!important;bottom:24px!important;width:360px!important}
  body>.bottom{bottom:14px!important}
}

/* Phone-first composition. */
@media(max-width:700px){
  body>header{
    height:54px!important;
    min-height:54px!important;
    padding-inline:11px!important;
  }
  body>header .subtitle{display:none!important}
  body>header #profile{
    width:40px!important;min-width:40px!important;height:40px!important;
    padding:0!important;
    font-size:0!important;
  }
  body>header #profile::after{
    content:"";
    width:20px;height:20px;border-radius:50%;
    display:block;margin:auto;
    background:
      radial-gradient(circle at 50% 34%,#547a9d 0 4px,transparent 4.5px),
      radial-gradient(ellipse at 50% 95%,#547a9d 0 8px,transparent 8.5px);
    opacity:.86;
  }
  main.map-first-main{
    height:calc(100dvh - 54px - var(--map-bottom))!important;
  }
  .map-primary-intent{
    top:10px;
    width:calc(100% - 20px);
    min-height:68px;
    grid-template-columns:44px minmax(0,1fr) 20px;
    gap:10px;
    border-radius:21px;
  }
  .map-primary-icon{width:44px;height:44px;border-radius:15px}
  .map-primary-copy strong{font-size:15px}
  .map-primary-copy small{font-size:10px}
  .map-primary-arrow{font-size:27px}
  .map-action-bar{
    top:88px!important;
    width:calc(100% - 20px);
    gap:6px!important;
  }
  .map-action-bar>a,.map-action-bar>button,.map-action-bar>details>summary{
    min-height:36px!important;
    padding:6px 9px!important;
    font-size:10px!important;
  }
  .map-first-main .privacy{
    bottom:86px!important;
    max-width:52%!important;
    border-radius:999px!important;
    background:rgba(255,255,255,.88)!important;
    box-shadow:0 5px 16px rgba(15,53,95,.08)!important;
  }
  .map-first-main .map-layout.sheet-enabled:not(.sheet-expanded) #nearby-sheet{
    left:10px!important;right:10px!important;bottom:12px!important;
    width:auto!important;max-height:74px!important;
    border-radius:21px!important;
  }
  .map-first-main .sheet-enabled:not(.sheet-expanded) #nearby-sheet-toggle{
    height:64px!important;border-radius:21px!important;
    background:rgba(255,255,255,.97)!important;
    font-size:14px!important;
  }
  .map-first-main .map-layout.sheet-enabled.sheet-expanded #nearby-sheet{
    left:8px!important;right:8px!important;bottom:8px!important;
    max-height:min(58dvh,calc(100% - 132px))!important;
    border-radius:25px!important;
  }
  body>.bottom{
    left:8px!important;right:8px!important;
    bottom:max(7px,env(safe-area-inset-bottom))!important;
    height:66px!important;min-height:66px!important;max-height:66px!important;
    border-radius:23px!important;
  }
  body>.bottom :is(a,button){min-height:52px!important}
  body>.bottom #create{
    width:58px!important;height:58px!important;min-height:58px!important;
    margin:-15px auto 0!important;
  }
  body>.bottom #create span{top:60px}
  dialog{
    width:calc(100% - 18px)!important;
    max-height:calc(100dvh - 28px)!important;
    padding:18px!important;
    border-radius:25px!important;
  }
}
@media(max-width:340px){
  .map-primary-copy strong{font-size:13px}
  .map-primary-copy small{font-size:9px}
  .map-action-bar>a,.map-action-bar>button,.map-action-bar>details>summary{padding-inline:7px!important;font-size:9px!important}
  body>.bottom{left:5px!important;right:5px!important;padding-inline:5px!important}
  body>.bottom span{font-size:8px!important}
}
@media(prefers-reduced-motion:reduce){
  .map-primary-intent,
  #nearby-sheet #list button.nearby-list-item,
  body>.bottom :is(a,button){transition:none!important}
}
/* final visual alignment */
body>header{gap:7px!important}
#i18n-language-switch{width:40px!important;min-width:40px!important;height:40px!important;min-height:40px!important;padding:0!important;border:0!important;border-radius:50%!important;background:#fff!important;box-shadow:0 4px 16px rgba(25,62,104,.09)!important;font-size:0!important;color:#52789b!important}
#i18n-language-switch::before{content:'文';font-size:15px;font-weight:800;line-height:1}
@media(max-width:700px){body>.bottom #create span{top:54px!important;font-size:8px!important}body>.bottom #create{margin-top:-13px!important}}
/* reference-v2 top action icon cleanup */
@media(max-width:700px){
 body>header{height:58px!important;min-height:58px!important}
 main.map-first-main{height:calc(100dvh - 58px - var(--map-bottom))!important}
 body>header #notifications,body>header #profile,#i18n-language-switch{width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;padding:0!important}
 body>header #profile{font-size:0!important;display:grid!important;place-items:center!important}
 body>header #profile::after{content:''!important;display:block!important;width:20px!important;height:20px!important;border-radius:50%!important;background:radial-gradient(circle at 50% 28%,#587896 0 4px,transparent 4.5px),radial-gradient(ellipse at 50% 100%,#587896 0 8px,transparent 8.5px)!important;opacity:.92!important}
 #i18n-language-switch{font-size:0!important;display:grid!important;place-items:center!important}
 #i18n-language-switch::before{content:''!important;display:block!important;width:19px!important;height:19px!important;border:1.8px solid #587896!important;border-radius:50%!important;background:linear-gradient(90deg,transparent 46%,#587896 46% 54%,transparent 54%),linear-gradient(0deg,transparent 46%,#587896 46% 54%,transparent 54%)!important}
 .map-primary-intent{top:10px!important}
}


/* Simple-mode modal contract: no horizontal movement, no service internals. */
dialog#panel{
  box-sizing:border-box!important;
  width:min(520px,calc(100vw - 16px))!important;
  max-width:calc(100vw - 16px)!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain;
}
dialog#panel .panel-head,
dialog#panel #panel-body{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow-x:hidden!important;
}
dialog#panel #panel-body *{
  box-sizing:border-box;
  min-width:0;
}
dialog#panel #panel-body > *{
  max-width:100%!important;
}
dialog#panel #panel-body :is(p,strong,span,small,label,h2,h3,a,button){
  overflow-wrap:anywhere;
}
dialog#panel #panel-body input:not([type="checkbox"]):not([type="radio"]),
dialog#panel #panel-body textarea,
dialog#panel #panel-body select{
  width:100%!important;
  max-width:100%!important;
}
dialog#panel #panel-body input[type="checkbox"],
dialog#panel #panel-body input[type="radio"]{
  width:18px!important;height:18px!important;min-width:18px!important;max-width:18px!important;
  flex:0 0 18px!important;margin:0!important;
}
dialog#panel #panel-body :is(button,a){
  white-space:normal!important;
  word-break:normal;
}
.my-hub-simple{display:grid;gap:14px;width:100%;min-width:0}
#my-hub-list{display:grid;gap:10px;width:100%;min-width:0}
.my-hub-entry{
  display:grid;gap:9px;width:100%;min-width:0;
  padding:14px!important;margin:0!important;
  border:1px solid #dce8f5;border-radius:18px;background:#fff!important;
  box-shadow:none!important;
}
.my-hub-entry--single{margin-top:4px!important}
.my-hub-title{
  display:block;font-size:16px;line-height:1.28;font-weight:800;color:#163c62;
  overflow-wrap:anywhere;
}
.my-hub-meta{display:block;font-size:13px;line-height:1.35;color:#7087a0}
.my-hub-entry-actions,.my-hub-actions{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;
}
.my-hub-entry-actions>button,.my-hub-actions>:is(button,a){
  display:flex;align-items:center;justify-content:center;
  width:100%;min-height:42px;margin:0!important;padding:9px 10px!important;
  border:1px solid #d6e4f3;border-radius:13px;background:#f8fbff;color:#244e78;
  text-align:center;text-decoration:none;font-size:14px;font-weight:680;
}
.my-hub-create-actions>:is(a,button):first-child{
  background:linear-gradient(135deg,#1784f7,#3158de);border-color:transparent;color:#fff;
}
.my-hub-secondary-actions{margin-top:0}
.my-hub-secondary-actions>:is(a,button){background:transparent;color:#607a95}
.my-hub-hint{margin:2px 0 0!important;font-size:12px;line-height:1.4;color:#748aa2}
#my-hub-status{margin:0;color:#71869d;font-size:14px}
@media(max-width:380px){
  dialog#panel{width:calc(100vw - 10px)!important;max-width:calc(100vw - 10px)!important;padding:14px!important}
  .my-hub-entry-actions,.my-hub-actions{grid-template-columns:1fr}
}


/* Compact modal scale for the simple product phase. */
dialog#panel{
  padding:14px!important;
  border-radius:20px!important;
}
dialog#panel .panel-head{
  gap:8px!important;
  padding:0 0 8px!important;
}
dialog#panel .panel-head h2{
  margin:0!important;
  font-size:20px!important;
  line-height:1.12!important;
  letter-spacing:-.35px!important;
}
dialog#panel .panel-head #panel-close{
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  min-height:34px!important;
  padding:0!important;
  font-size:20px!important;
}
dialog#panel #panel-body{
  font-size:14px!important;
}
dialog#panel #panel-body p{
  margin:6px 0 12px!important;
  font-size:14px!important;
  line-height:1.45!important;
}
dialog#panel #panel-body :is(button,a){
  font-size:13px;
}
dialog#panel #panel-body button{
  min-height:38px;
  padding:8px 10px;
}

.profile-more{
  margin-top:12px;
  border-top:1px solid #e4edf7;
  padding-top:10px;
}
.profile-more>summary{
  cursor:pointer;
  min-height:40px;
  display:flex;
  align-items:center;
  color:#647c96;
  font-size:13px;
  font-weight:700;
}
.profile-more:not([open])>summary{margin-bottom:0}
.profile-more[open]>summary{margin-bottom:10px}
.profile-more>*:not(summary){max-width:100%}
#avatar-preview{
  width:72px!important;height:72px!important;border-radius:50%;
  margin:12px 0 4px;object-fit:cover;
}


/* Navigation-app composition: compact header, right controls, 3-tab dock. */
@media(max-width:700px){
 body>header{height:52px!important;min-height:52px!important;padding:0 12px!important;background:rgba(249,252,255,.96)!important;box-shadow:0 1px 0 #dce7f3!important;gap:3px!important}
 main.map-first-main{height:calc(100dvh - 52px - var(--map-bottom))!important}
 body>header .brand{font-size:21px!important}
 body>header #notifications,#i18n-language-switch{width:32px!important;min-width:32px!important;height:32px!important;min-height:32px!important;padding:4px!important;border:0!important;border-radius:8px!important;background:transparent!important;box-shadow:none!important}
 body>header #notifications .m2g-icon{width:20px!important;height:20px!important}
 #i18n-language-switch{font-size:11px!important;font-weight:800!important;color:#57718b!important;display:grid!important;place-items:center!important}
 #i18n-language-switch::before{display:none!important;content:none!important}
 .map-primary-intent{top:10px!important;left:10px!important;transform:none!important;width:calc(100% - 74px)!important;min-height:54px!important;padding:7px 11px!important;border-radius:17px!important;grid-template-columns:38px minmax(0,1fr) 18px!important;gap:9px!important}
 .map-primary-intent:hover{transform:translateY(-1px)!important}
 .map-primary-icon{width:38px!important;height:38px!important;border-radius:12px!important;font-size:22px!important}
 .map-primary-copy strong{font-size:14px!important}.map-primary-copy small{font-size:9.5px!important}
 .map-action-bar{display:block!important;position:absolute!important;inset:0!important;width:100%!important;transform:none!important;pointer-events:none}
 .map-action-bar>*{pointer-events:auto}
 #nationwide-search{position:absolute!important;top:72px!important;left:10px!important;width:auto!important;min-height:34px!important;padding:6px 11px!important;border-radius:12px!important;font-size:11px!important}
 #gps,#map-3d,#map-tools>summary{position:absolute!important;right:10px!important;width:42px!important;height:42px!important;min-height:42px!important;padding:0!important;border-radius:13px!important;background:rgba(255,255,255,.94)!important;box-shadow:0 6px 18px rgba(20,60,105,.12)!important;display:grid!important;place-items:center!important;font-size:10px!important;color:#526e89!important}
 #gps{top:72px!important}#gps span{display:none!important}#gps .m2g-icon{width:19px!important;height:19px!important}
 #map-3d{top:120px!important;font-weight:800!important}
 #map-tools{position:static!important}#map-tools>summary{top:168px!important;list-style:none!important}#map-tools>summary span{display:none!important}#map-tools>summary .m2g-icon{width:19px!important;height:19px!important}
 .map-filter-body{top:216px!important;left:8px!important;right:8px!important;width:auto!important;max-height:calc(100dvh - 310px)!important;overflow:auto!important}
 .maplibregl-ctrl-top-left{left:auto!important;right:10px!important;top:216px!important}
 .maplibregl-ctrl-top-left .maplibregl-ctrl{margin:0!important;border-radius:13px!important;overflow:hidden!important;box-shadow:0 6px 18px rgba(20,60,105,.12)!important}
 .maplibregl-ctrl-group button{width:42px!important;height:38px!important}
 body>.bottom{height:64px!important;min-height:64px!important;max-height:64px!important;left:12px!important;right:12px!important;padding:5px!important;border-radius:22px!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}
 body>.bottom #create{display:none!important}
 body>.bottom #conversations{order:1}body>.bottom a[aria-current="page"]{order:2}body>.bottom #my-items{order:3}
 body>.bottom :is(a,button){min-height:52px!important;border-radius:17px!important}
 body>.bottom a[aria-current="page"]{background:#edf5ff!important;color:#176ee0!important}
}
dialog#panel .panel-head #panel-close{width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;border:0!important;border-radius:8px!important;background:transparent!important;box-shadow:none!important;color:#5d748b!important;font-size:24px!important;font-weight:350!important}
.my-hub-entry-actions .danger{color:#b42318!important;border-color:#f1c7c3!important;background:#fff!important}
.taxi-quick{display:grid;gap:12px}.taxi-mode{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important;padding:3px!important;border-radius:12px!important;background:#f3f7fb!important}
.taxi-mode button{min-height:36px!important;padding:7px 8px!important;border:0!important;border-radius:9px!important;background:transparent!important;color:#60758c!important;font-size:13px!important;font-weight:700!important;box-shadow:none!important}
.taxi-mode button[aria-pressed="true"]{background:#fff!important;color:#1d5fae!important;box-shadow:0 1px 4px rgba(20,60,100,.10)!important}
.taxi-chat-explanation{font-size:13px!important;line-height:1.4!important;color:#6f8298!important;margin:4px 0 8px!important}
.taxi-options{display:grid!important;gap:0!important;padding:6px 0!important;border:0!important}
.taxi-options legend{font-size:13px!important;font-weight:800!important;margin:0 0 4px!important;padding:0!important}
.taxi-options label{display:flex!important;align-items:center!important;gap:10px!important;min-height:38px!important;margin:0!important;padding:7px 2px!important;border-bottom:1px solid #edf2f7;font-size:14px!important}
.taxi-options label:last-child{border-bottom:0}


/* Final reference pass: native-size header actions, no bubbles. */
@media(max-width:700px){
  body>header #notifications,
  body>header #profile,
  #i18n-language-switch{
    width:30px!important;min-width:30px!important;height:30px!important;min-height:30px!important;
    padding:3px!important;margin:0!important;border:0!important;border-radius:7px!important;
    background:transparent!important;box-shadow:none!important;
  }
  body>header #notifications:hover,
  body>header #profile:hover,
  #i18n-language-switch:hover{
    background:#eef4fa!important;transform:none!important;box-shadow:none!important;
  }
  body>header #notifications .m2g-icon{width:19px!important;height:19px!important}
  body>header #profile::after{width:18px!important;height:18px!important}
  #i18n-language-switch{font-size:11px!important}
  body>header{column-gap:2px!important}
}


/* Stable modal shell: header and close never scroll away. */
dialog#panel[open]{
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr) auto!important;
  max-height:min(90dvh,780px)!important;
  overflow:hidden!important;
}
dialog#panel .panel-head{
  position:relative!important;
  top:auto!important;
  z-index:5!important;
  flex:0 0 auto!important;
  background:#fff!important;
  padding:0 0 10px!important;
  margin:0!important;
}
dialog#panel #panel-body{
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch;
  padding-right:2px!important;
}
dialog#panel #panel-error{
  flex:0 0 auto!important;
  margin:6px 0 0!important;
}

/* Informative compact header icons. */
body>header #profile::after{
  content:''!important;
  width:19px!important;height:19px!important;
  display:block!important;
  background:
    radial-gradient(circle at 50% 30%,transparent 0 3.4px,#58718a 3.6px 5px,transparent 5.2px),
    radial-gradient(ellipse at 50% 105%,transparent 0 7.2px,#58718a 7.4px 9px,transparent 9.2px)!important;
  border-radius:0!important;
  opacity:1!important;
}
#i18n-language-switch{
  font-size:10px!important;
  font-weight:800!important;
  letter-spacing:.03em!important;
  color:#47708f!important;
}
#i18n-language-switch::before{display:none!important;content:none!important}

/* Restore territory game in the right-side map control stack. */
@media(max-width:700px){
 .map-action-bar .hex-game-toggle{
   position:absolute!important;
   top:216px!important;
   right:10px!important;
   width:42px!important;
   min-width:42px!important;
   max-width:42px!important;
   height:42px!important;
   min-height:42px!important;
   padding:0!important;
   margin:0!important;
   border:1px solid #d9e5f1!important;
   border-radius:13px!important;
   background:rgba(255,255,255,.96)!important;
   color:#5c6f86!important;
   box-shadow:0 6px 18px rgba(20,60,105,.12)!important;
   display:grid!important;
   place-items:center!important;
   z-index:4!important;
   animation:none!important;
   transform:none!important;
 }
 .map-action-bar .hex-game-toggle .hex-game-toggle-name{display:none!important}
 .map-action-bar .hex-game-toggle .hex-game-toggle-icon{font-size:18px!important;line-height:1!important}
 .map-action-bar .hex-game-toggle.is-on{
   background:#f1edff!important;
   color:#6844c7!important;
   border-color:#cfc2f5!important;
   box-shadow:0 6px 18px rgba(77,50,150,.14)!important;
 }
 #map-tools[open]~.hex-game-toggle{visibility:hidden!important}
 .maplibregl-ctrl-top-left{top:264px!important}
}


/* Live intent selection: public intent counts; never exact personal location. */
.m2g-market-switch{
  display:grid;grid-template-columns:minmax(0,.78fr) minmax(0,1.15fr) minmax(0,1.15fr);
  position:absolute;z-index:10;top:142px;left:50%;
  transform:translateX(-50%);
  gap:5px;width:min(560px,calc(100% - 28px));margin:0;
  padding:4px;border:1px solid rgba(77,102,133,.32);
  background:rgba(14,24,38,.90);border-radius:14px;
}
.m2g-market-switch[hidden]{display:none!important}
.m2g-market-switch button{
  min-width:0;min-height:38px;padding:7px 5px;white-space:nowrap;
  border:1px solid transparent;border-radius:10px;
  background:transparent;color:#dce7ef;box-shadow:none;
  font:600 12px/1.15 system-ui,-apple-system,sans-serif;
  display:flex;align-items:center;justify-content:center;gap:5px;cursor:pointer;
}
.m2g-market-switch button[aria-pressed="true"]{
  background:#e3f0fc;color:#132943;border-color:#e3f0fc;
}
.m2g-market-switch button:focus-visible{outline:2px solid #6accc6;outline-offset:1px}
.m2g-market-count{
  display:inline-flex;justify-content:center;align-items:center;
  min-width:22px;min-height:22px;padding:1px 4px;
  font-size:11px;line-height:1;font-variant-numeric:tabular-nums;
  background:rgba(114,162,208,.19);color:inherit;border-radius:9px;
}
.m2g-market-switch button[data-market-role="need"] .m2g-market-count{background:rgba(52,122,224,.28)}
.m2g-market-switch button[data-market-role="offer"] .m2g-market-count{background:rgba(41,176,121,.23)}
@media(max-width:390px){
 .m2g-market-switch{gap:2px;padding:3px;margin-top:4px}
 .m2g-market-switch button{font-size:11px;padding-inline:3px;gap:3px;min-height:36px}
 .m2g-market-count{min-width:18px;font-size:10px;padding-inline:2px}
}

@media(min-width:701px){
 .m2g-market-switch{left:30px;transform:none;width:430px;top:142px}
 .map-first-main #notice:not([hidden]){top:198px!important}
}
@media(max-width:700px){
 .m2g-market-switch{top:120px;left:10px;right:60px;transform:none;width:auto}
 .map-first-main #notice:not([hidden]){top:174px!important;left:10px!important;right:60px!important;width:calc(100% - 70px)!important;transform:none!important}
}
