/* MTG Mobile Navigation 1.3.0 — scoped, dependency-free styles. */
#mtg-mobile-nav,
#mtg-mobile-nav-sheet {
  box-sizing: border-box;
  --mn-green: #5f7845;
  --mn-ink: #263321;
  --mn-muted: #65705f;
  --mn-line: #dfe6d9;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.45;
  color: var(--mn-ink);
  -webkit-text-size-adjust: 100%;
}
#mtg-mobile-nav *, #mtg-mobile-nav-sheet * { box-sizing: border-box; }
#mtg-mobile-nav[hidden], #mtg-mobile-nav [hidden], #mtg-mobile-nav-sheet [hidden] { display: none !important; }
#mtg-mobile-nav {
  position: fixed;
  z-index: 99980;
  left: calc(14px + env(safe-area-inset-left, 0px));
  bottom: calc(var(--mn-bottom, 24px) + env(safe-area-inset-bottom, 0px));
}
#mtg-mobile-nav[data-side="right"] {
  left: auto;
  right: calc(14px + env(safe-area-inset-right, 0px));
}
#mtg-mobile-nav .mtg-mn-trigger {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  max-width: calc(100vw - 32px);
  margin: 0;
  padding: 0 13px 0 15px;
  border: 1px solid #79915f;
  border-radius: 999px;
  background: var(--mn-green);
  color: #fff !important;
  box-shadow: 0 6px 24px #26332129, 0 1px 4px #2633211a;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
#mtg-mobile-nav .mtg-mn-trigger:hover { background: #4e6637; }
#mtg-mobile-nav .mtg-mn-count {
  display: grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ffffff24;
  color: #fff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
#mtg-mobile-nav svg, #mtg-mobile-nav-sheet svg { display: block; flex-shrink: 0; }
#mtg-mobile-nav-sheet {
  position: fixed;
  inset: auto 0 0;
  width: min(100%, 480px);
  max-width: 100%;
  max-height: 84vh;
  max-height: min(84dvh, 720px);
  margin: 0 auto;
  padding: 0;
  border: 1px solid var(--mn-line);
  border-bottom: 0;
  border-radius: 25px 25px 0 0;
  background: #fff;
  box-shadow: 0 -10px 50px #17211224;
  overflow: hidden;
  overscroll-behavior: contain;
}
#mtg-mobile-nav-sheet:not([open]) { display: none; }
#mtg-mobile-nav-sheet[open] { display: flex; flex-direction: column; animation: mtg-mn-enter .19s ease-out; }
#mtg-mobile-nav-sheet::backdrop { background: #17211266; backdrop-filter: blur(3px); }
#mtg-mobile-nav-sheet .mtg-mn-head { flex: 0 0 auto; padding: 10px 18px 0; touch-action: pinch-zoom; }
#mtg-mobile-nav-sheet .mtg-mn-handle { width: 34px; height: 4px; margin: 0 auto 8px; border-radius: 99px; background: #d4dccf; }
#mtg-mobile-nav-sheet .mtg-mn-heading-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
#mtg-mobile-nav-sheet .mtg-mn-title { margin: 0; color: var(--mn-ink); font: inherit; font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -.025em; }
#mtg-mobile-nav-sheet .mtg-mn-close {
  appearance: none; display: grid; place-items: center; flex: 0 0 44px;
  width: 44px; height: 44px; margin: 0; padding: 0;
  border: 1px solid var(--mn-line); border-radius: 50%;
  background: #f5f7f2; color: #33482a !important; cursor: pointer;
}
#mtg-mobile-nav-sheet .mtg-mn-tabs { display: flex; gap: 4px; padding: 4px; margin: 10px 0 0; border: 1px solid #e6ebe1; border-radius: 13px; background: #f3f6ef; }
#mtg-mobile-nav-sheet .mtg-mn-tab {
  appearance: none; flex: 1; min-height: 44px; margin: 0; padding: 8px 12px;
  border: 0; border-radius: 9px; background: transparent; color: #58654f !important;
  font: inherit; font-size: 14px; font-weight: 650; text-transform: none; letter-spacing: 0; cursor: pointer;
}
#mtg-mobile-nav-sheet .mtg-mn-tab[aria-selected="true"] { background: #fff; color: #304626 !important; box-shadow: 0 1px 4px #26332112; }
#mtg-mobile-nav-sheet .mtg-mn-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 13px 18px 16px; -webkit-overflow-scrolling: touch; }
#mtg-mobile-nav-sheet .mtg-mn-context { margin: 0 0 10px; color: var(--mn-muted); font-size: 12px; line-height: 1.4; }
/* A fixed basis keeps the last row centred, including filtered search results. */
#mtg-mobile-nav-sheet .mtg-mn-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
#mtg-mobile-nav-sheet a.mtg-mn-provider {
  display: grid; grid-template-columns: minmax(0, 1fr) 16px;
  flex: 0 0 calc((100% - 8px) / 2); align-content: center; align-items: center;
  gap: 4px 7px; min-height: 78px; min-width: 0;
  padding: 9px 12px; border: 1px solid #e3e8de; border-radius: 12px;
  background: #fff; color: #293725 !important;
  font: inherit; font-size: 13px; font-weight: 650; line-height: 1.3;
  text-decoration: none !important; box-shadow: none;
  transition: background-color .14s ease, border-color .14s ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
#mtg-mobile-nav-sheet a.mtg-mn-provider[aria-current="location"] {
  border-color: #9aac89; background: #f1f6eb; box-shadow: none;
}
#mtg-mobile-nav-sheet .mtg-mn-mark {
  display: flex; align-items: center; justify-content: flex-start;
  width: 84px; max-width: 100%; height: 32px;
  background: transparent; color: #5f7845;
}
#mtg-mobile-nav-sheet .mtg-mn-mark img {
  display: block; width: 32px; height: 30px; max-width: 100%;
  object-fit: contain; object-position: left center;
}
#mtg-mobile-nav-sheet .mtg-mn-mark[data-kind="wordmark"] img { width: 80px; }
/* Optical sizing adjusts the box, never the proportions or source artwork. */
#mtg-mobile-nav-sheet [data-provider="saily"] .mtg-mn-mark img { width: 74px; height: 29px; }
#mtg-mobile-nav-sheet [data-provider="ubigi"] .mtg-mn-mark img,
#mtg-mobile-nav-sheet [data-provider="alosim"] .mtg-mn-mark img { width: 38px; height: 32px; }
#mtg-mobile-nav-sheet .mtg-mn-initial {
  display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 8px; background: #edf2e7; font-size: 11px; font-weight: 800;
}
#mtg-mobile-nav-sheet .mtg-mn-name { grid-column: 1 / -1; min-width: 0; overflow-wrap: break-word; }
#mtg-mobile-nav-sheet .mtg-mn-check { align-self: start; justify-self: end; margin-top: 1px; color: #5f7845; visibility: hidden; }
#mtg-mobile-nav-sheet [aria-current="location"] .mtg-mn-check { visibility: visible; }
@media (hover: hover) {
  #mtg-mobile-nav-sheet a.mtg-mn-provider:hover { background: #f6f8f2; border-color: #b2c0a6; }
  #mtg-mobile-nav-sheet a.mtg-mn-provider[aria-current="location"]:hover { background: #edf3e6; border-color: #8ea379; }
}
#mtg-mobile-nav-sheet .mtg-mn-sections { display: flex; flex-direction: column; gap: 5px; }
#mtg-mobile-nav-sheet a.mtg-mn-section { display: flex; gap: 12px; align-items: center; min-height: 48px; padding: 11px 12px; border-radius: 10px; color: #34482b !important; text-decoration: none !important; font-size: 14px; line-height: 1.4; background: #f6f8f3; }
#mtg-mobile-nav-sheet .mtg-mn-index { flex: 0 0 20px; color: #77856d; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
#mtg-mobile-nav-sheet a.mtg-mn-section[aria-current="location"] { background: #eaf1e1; box-shadow: inset 3px 0 #5f7845; }
#mtg-mobile-nav-sheet .mtg-mn-foot { flex: 0 0 auto; padding: 11px 18px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #e9eee3; background: #fff; }
#mtg-mobile-nav-sheet a.mtg-mn-compare { display: flex; gap: 10px; justify-content: center; align-items: center; min-height: 48px; padding: 11px 14px; border-radius: 12px; background: #5f7845; color: #fff !important; text-decoration: none !important; font-size: 14px; font-weight: 700; }
#mtg-mobile-nav-sheet a.mtg-mn-compare:hover { background: #4e6637; }
#mtg-mobile-nav .mtg-mn-trigger:focus-visible,
#mtg-mobile-nav-sheet :is(button,a):focus-visible { outline: 3px solid #b08a27; outline-offset: 3px; }
.mtg-mn-target:focus { outline: none; }
html.mtg-mn-open { overflow: hidden !important; overscroll-behavior: none; }
@keyframes mtg-mn-enter { from { transform: translateY(18px); opacity: .5; } to { transform: translateY(0); opacity: 1; } }
@media (max-width: 350px) {
  #mtg-mobile-nav-sheet .mtg-mn-head { padding-inline: 13px; }
  #mtg-mobile-nav-sheet .mtg-mn-body { padding-inline: 13px; }
  #mtg-mobile-nav-sheet .mtg-mn-foot { padding-inline: 13px; }
  #mtg-mobile-nav-sheet a.mtg-mn-provider { padding-inline: 10px; }
}
@media (max-height: 480px) {
  #mtg-mobile-nav-sheet { max-height: 96vh; max-height: 96dvh; }
  #mtg-mobile-nav-sheet .mtg-mn-handle { display: none; }
  #mtg-mobile-nav-sheet .mtg-mn-title { font-size: 20px; }
  #mtg-mobile-nav-sheet .mtg-mn-tabs { margin-top: 9px; }
  #mtg-mobile-nav-sheet .mtg-mn-context { display: none; }
}
@media (max-width: 280px) { #mtg-mobile-nav-sheet a.mtg-mn-provider { flex-basis: 100%; } }
@media (prefers-reduced-motion: reduce) {
  #mtg-mobile-nav-sheet[open] { animation: none; }
  #mtg-mobile-nav-sheet a.mtg-mn-provider { transition: none; }
}
@media print { #mtg-mobile-nav, #mtg-mobile-nav-sheet { display: none !important; } }

/* v1.1: quiet logo tiles, contextual trigger and one-step reading return. */
#mtg-mobile-nav { display:flex; flex-direction:column; align-items:flex-start; gap:8px; }
#mtg-mobile-nav[data-side="right"] { align-items:flex-end; }
#mtg-mobile-nav .mtg-mn-trigger { gap:8px; max-width:min(300px,calc(100vw - 32px)); }
#mtg-mobile-nav .mtg-mn-trigger-label { flex-shrink:0; }
#mtg-mobile-nav .mtg-mn-current-label { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding-left:9px; border-left:1px solid #ffffff55; font-weight:500; font-size:12px; }
#mtg-mobile-nav .mtg-mn-return { appearance:none; display:flex; align-items:center; gap:7px; min-height:44px; max-width:calc(100vw - 32px); margin:0; padding:9px 13px; border:1px solid #dce5d4; border-radius:999px; background:#fff; color:#34492a!important; box-shadow:0 3px 14px #2633211a; font:inherit; font-size:12px; font-weight:650; text-transform:none; letter-spacing:0; line-height:1.3; cursor:pointer; }
#mtg-mobile-nav .mtg-mn-return:hover { background:#f3f6ef; }
#mtg-mobile-nav-sheet.mtg-mn-dragging { animation:none; transition:none; user-select:none; }
#mtg-mobile-nav-sheet .mtg-mn-search { display:flex; align-items:center; gap:9px; margin:0 0 13px; padding:0 12px; border:1px solid #dbe3d3; border-radius:11px; color:#69775f; background:#f8faf5; }
#mtg-mobile-nav-sheet .mtg-mn-search input { appearance:none; width:100%; min-width:0; height:46px; margin:0; padding:10px 0; border:0; border-radius:0; background:transparent; box-shadow:none; color:#263321; font:inherit; font-size:16px; line-height:1.4; }
#mtg-mobile-nav-sheet .mtg-mn-search:focus-within { outline:2px solid #829b68; outline-offset:2px; }
#mtg-mobile-nav-sheet .mtg-mn-search input:focus { outline:none; box-shadow:none; }
#mtg-mobile-nav-sheet .mtg-mn-empty { padding:16px 0; color:#65705f; font-size:14px; }
#mtg-mobile-nav-sheet .mtg-mn-body-last { padding-bottom:calc(20px + env(safe-area-inset-bottom,0px)); }

/* Desktop: a compact corner panel, using the same article navigation. */
#mtg-mobile-nav[data-mode="desktop"] { left:24px; }
#mtg-mobile-nav[data-mode="desktop"][data-side="right"] { left:auto; right:24px; }
#mtg-mobile-nav-sheet[data-mode="desktop"] {
  inset:auto auto max(16px,var(--mn-bottom,24px)) 24px;
  width:400px; max-width:calc(100vw - 48px);
  max-height:calc(100vh - max(16px,var(--mn-bottom,24px)) - 24px);
  max-height:min(680px,calc(100dvh - max(16px,var(--mn-bottom,24px)) - 24px));
  margin:0; border:1px solid #dce5d4; border-radius:22px;
  box-shadow:0 18px 65px #1b2c1929,0 3px 10px #1b2c1912;
}
#mtg-mobile-nav-sheet[data-mode="desktop"][data-side="right"] { left:auto; right:24px; }
#mtg-mobile-nav-sheet[data-mode="desktop"]::backdrop { background:#17211218; backdrop-filter:none; }
#mtg-mobile-nav-sheet[data-mode="desktop"] .mtg-mn-head { padding-top:14px; touch-action:auto; }
#mtg-mobile-nav-sheet[data-mode="desktop"] .mtg-mn-handle { display:none; }
#mtg-mobile-nav-sheet[data-mode="desktop"] .mtg-mn-title { font-size:22px; }
#mtg-mobile-nav-sheet[data-mode="desktop"] a.mtg-mn-provider { flex-basis:calc((100% - 16px) / 3); padding:9px 10px; grid-template-columns:minmax(0,1fr) 12px; column-gap:0; }
#mtg-mobile-nav-sheet[data-mode="desktop"] .mtg-mn-mark { grid-column:1 / -1; grid-row:1; width:80px; }
#mtg-mobile-nav-sheet[data-mode="desktop"] .mtg-mn-check { grid-column:2; grid-row:1; margin-top:-2px; position:relative; right:-3px; }
#mtg-mobile-nav-sheet[data-mode="desktop"] .mtg-mn-foot { padding-bottom:14px; }
@media (max-height:480px) {
  #mtg-mobile-nav-sheet[data-mode="desktop"] { bottom:12px; max-height:calc(100dvh - 24px); }
  #mtg-mobile-nav-sheet[data-mode="desktop"] .mtg-mn-head { padding-top:12px; }
}
html.mtg-mn-keep-gutter { scrollbar-gutter:stable; }
