/* Restored pre-system corner styling. The bottom navigation tray intentionally
   remains rectangular; only its inset selected-tab highlight is rounded. */
html:root header{border-radius:0 0 24px 24px;}
html:root .readout{border-radius:18px;padding:14px 16px;}
html:root .bound-panel{border-radius:10px;padding:10px 12px;}
html:root button.bound-btn{border-radius:12px;}
html:root .kmpost{border-radius:20px;}
html:root .bridge-filter-menu{border-radius:14px;}
html:root .bridge-filter-option{border-radius:9px;}
html:root .lane-modal{border-radius:12px;padding:16px;}
html:root .lane-modal :is(input,.edit-select,.modal-actions button){border-radius:8px;}
html:root .edit-photo-thumb-wrap{border-radius:10px;overflow:hidden;cursor:zoom-in;}
html:root .edit-photo-thumb-wrap img{border-radius:0;display:block;}
html:root .camera-lane-picker{border-radius:10px;padding:9px 11px;}
html:root .camera-lane-picker :is(select,input){border-radius:7px;}
html:root .select-toggle-btn,html:root .export-btn{border-radius:999px;}
html:root .swipe-row{border-radius:8px;}
html:root .swipe-row .log-entry{border-radius:8px;}
html:root[data-theme="light"] .swipe-row .log-entry{border-radius:16px;}
html:root[data-theme="light"] .swipe-row{border-radius:16px;}

.map-view{--map-control-inset:11px;}
html:root :is(.map-topbar,.map-entry-controls){
  background:linear-gradient(180deg,rgba(30,41,49,.94),rgba(17,30,39,.94));
  color:#eef4f6;border-color:rgba(255,255,255,.16);border-radius:14px;
  box-shadow:0 8px 22px rgba(0,0,0,.24);
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
}
html:root[data-theme="light"] :is(.map-topbar,.map-entry-controls){
  background:rgba(255,255,255,.95);color:#252a2e;
  border-color:rgba(32,42,49,.10);box-shadow:0 7px 20px rgba(38,48,56,.13);
}
html:root .map-topbar{padding:10px 11px 10px 14px;}
html:root .map-entry-controls{padding:10px;display:grid;grid-template-columns:auto minmax(0,1fr) auto minmax(0,1fr) auto;gap:6px;align-items:center;font-size:11px;}
html:root :is(.map-entry-controls,.entry-filters) :is(input[type="date"],button,select){border-radius:10px;}
.map-floating-actions{position:absolute;right:var(--map-control-inset);bottom:calc(100% + 12px);display:flex;flex-direction:column;gap:8px;}
html:root .map-topbar .map-theme-toggle,
html:root .map-floating-actions :is(.map-locate-btn,.map-theme-toggle){
  width:44px;height:44px;min-height:44px;flex:0 0 44px;padding:0;
  border-radius:50%;border-color:var(--border-strong);
  background:linear-gradient(180deg,rgba(30,41,49,.98),rgba(17,30,39,.98));
  color:var(--line-white);box-shadow:var(--shadow-card);
}
html:root[data-theme="light"] .map-topbar .map-theme-toggle,
html:root[data-theme="light"] .map-floating-actions :is(.map-locate-btn,.map-theme-toggle){background:#f4f6f7;color:#25343d;}
html:root .entry-filters{grid-template-columns:minmax(0,1.15fr) auto minmax(0,1.15fr) minmax(0,1fr) auto;align-items:center;}
.date-range-separator{align-self:center;}
.map-filter-menu > summary{list-style:none;cursor:pointer;width:38px;min-height:38px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;padding:6px;border:1px solid var(--border-strong);border-radius:10px;background:var(--panel);}
.map-filter-menu > summary::-webkit-details-marker{display:none;}
.map-filter-menu[open] > summary{color:var(--road-yellow);}
.map-filter-menu > summary svg{width:18px;height:18px;fill:currentColor;}
.map-filter-options{position:absolute;bottom:calc(100% + 8px);left:0;right:56px;padding:10px;display:flex;gap:8px;align-items:end;background:var(--panel);border:1px solid var(--border-strong);border-radius:14px;box-shadow:var(--shadow-card);}
.map-filter-options label{flex:1;min-width:0;flex-direction:column;align-items:stretch;}
.map-filter-options select{min-width:0;width:100%;min-height:38px;background:var(--panel);color:var(--line-white);border:1px solid var(--border-strong);padding:6px;font:inherit;}
.map-entry-controls > label{min-width:0;flex-direction:column;align-items:stretch;gap:4px;}
.map-entry-controls > label:first-of-type{flex-direction:row;align-items:center;align-self:center;white-space:nowrap;gap:4px;}

/* Center dates while still allowing native controls to shrink on iOS.
   Vertical centring is done by SIZING the box symmetrically around the text
   (auto height + equal block padding) rather than by nudging the shadow DOM.
   `appearance:none` plus a forced height leaves the text top-aligned, and the
   ::-webkit-datetime-edit rules below only apply to Chromium — iOS renders
   these natively and ignored them. Symmetric padding is engine-agnostic.
   11px font at line-height 1.3 => ~44px total, matching the 44px filter button. */
html:root :is(.entry-filters,.map-entry-controls) > label{max-width:100%;min-inline-size:0;}
html:root :is(.entry-filters,.map-entry-controls) input[type="date"]{
  display:block;appearance:none;-webkit-appearance:none;box-sizing:border-box;
  width:100%;inline-size:100%;min-width:0;min-inline-size:0;max-width:100%;
  overflow:hidden;text-align:center;text-align-last:center;padding-inline:4px;
  height:auto;min-height:0;
  padding-top:12px;padding-bottom:12px;line-height:1.3;
}
html:root :is(.entry-filters,.map-entry-controls) input[type="date"]::-webkit-date-and-time-value{width:100%;min-width:0;text-align:center;}
/* Chromium belt-and-braces: keep the inner edit boxes full-height so their own
   centring also applies. No effect on iOS, which is why the padding above is
   the real fix. */
html:root :is(.entry-filters,.map-entry-controls) input[type="date"]::-webkit-datetime-edit{display:flex;width:100%;min-width:0;height:100%;box-sizing:border-box;padding:0;justify-content:center;align-items:center;}
html:root :is(.entry-filters,.map-entry-controls) input[type="date"]::-webkit-datetime-edit-fields-wrapper{display:flex;height:100%;justify-content:center;align-items:center;}
/* The native calendar glyph is not part of this design and, sitting in flow, it
   steals width from the centred text (clipping it on the narrower map fields).
   Overlay it invisibly instead, so the whole field still opens the picker. */
html:root :is(.entry-filters,.map-entry-controls) input[type="date"]{position:relative;}
html:root :is(.entry-filters,.map-entry-controls) input[type="date"]::-webkit-calendar-picker-indicator{
  position:absolute;left:0;top:0;width:100%;height:100%;margin:0;padding:0;opacity:0;cursor:pointer;
}

html:root .photo-card{border-radius:8px;overflow:hidden;}
html:root #photo-preview{border-radius:0;display:block;}
:where(button,input,select,a,[role="button"],[role="tab"]):focus-visible{outline:2px solid var(--line-yellow);outline-offset:2px;}
@media(max-width:400px){
  html:root .entry-filters{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);}
  .entry-filters > label:nth-of-type(3){grid-column:1 / 3;}
  .entry-filters > button{grid-column:3;}
}
