/* Village mailbox (pastkastīte): .mbx-m on the mobile map, .mbx-d on the desktop map-stage (% of stage, tracks scaling) */
.mbx { display: none; }
.mbx-d { display: block; position: absolute; z-index: 5; width: 2.1%; transform: translate(-50%, -100%); padding: 0; border: 0; background: none; cursor: pointer; }
.mbx-d img { display: block; width: 100%; height: auto; transform: scaleX(-1); filter: brightness(.92); transition: filter .22s; }
.mbx-d::before { content: ""; position: absolute; left: -90%; right: -90%; top: -35%; bottom: -15%; border-radius: 50%; opacity: 0; transition: opacity .22s; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, rgba(255,196,120,.38), rgba(255,140,50,.12) 50%, rgba(255,140,50,0) 72%); }
.mbx-d:hover::before, .mbx-d:focus-visible::before, .mbx-d.is-lit::before { opacity: 1; }
.mbx-d:hover img, .mbx-d.is-lit img { filter: brightness(1.2) drop-shadow(0 0 6px rgba(255,170,80,.35)); }
.mbx-d .spot-tip { left: 50%; top: 0; }
.mbx-d:hover .spot-tip, .mbx-d:focus-visible .spot-tip, .mbx-d.is-lit .spot-tip { opacity: 1; }
@media (max-width: 768px), (orientation: portrait) {
  .mbx-d { display: none; }
  .mbx-m { display: block; position: absolute; z-index: 5; width: 10.5%; transform: translate(-50%, -100%);
    padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .mbx img { display: block; width: 100%; height: 100%; height: auto; filter: brightness(.95); transition: filter .22s; }
  .mbx::before { content: ""; position: absolute; left: -90%; right: -90%; top: -35%; bottom: -15%; border-radius: 50%; opacity: 0; transition: opacity .22s; pointer-events: none;
    background: radial-gradient(ellipse at 50% 45%, rgba(255,196,120,.38), rgba(255,140,50,.12) 50%, rgba(255,140,50,0) 72%); }
  .mbx:hover::before, .mbx:focus-visible::before, .mbx.is-lit::before { opacity: 1; }
  .mbx:hover img, .mbx.is-lit img { filter: brightness(1.2) drop-shadow(0 0 6px rgba(255,170,80,.35)); }
  .mbx:focus-visible { outline: 2px solid rgba(255,214,160,.9); outline-offset: 3px; border-radius: 6px; }
  .mbx .spot-tip { left: 50%; top: 0; }
  .mbx:hover .spot-tip, .mbx:focus-visible .spot-tip, .mbx.is-lit .spot-tip { opacity: 1; }
}
/* letter modal */
.mbx-modal[hidden] { display: none; }
.mbx-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(6,8,6,.72); backdrop-filter: blur(3px); }
.mbx-card { position: relative; width: min(100%, 420px); max-height: calc(100vh - 36px); overflow: auto; padding: 22px 20px 18px; border-radius: 10px;
  color: #3a2614; font-family: Palatino, "Palatino Linotype", Georgia, serif;
  background: radial-gradient(ellipse at 30% 20%, #f3e3c0, #e3cb9c 60%, #cfb07a); border: 6px solid #4a2f1a;
  box-shadow: 0 0 0 1px #2a1a0e, inset 0 0 40px rgba(120,70,20,.35), 0 18px 50px rgba(0,0,0,.7), 0 0 60px rgba(255,150,60,.12); }
.mbx-card h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: .02em; }
.mbx-card p.sub { margin: 0 0 14px; font-size: 14px; opacity: .8; }
.mbx-card label { display: block; margin: 10px 0 4px; font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.mbx-card label i { font-weight: 400; font-style: normal; opacity: .65; }
.mbx-card input, .mbx-card textarea { width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid rgba(74,47,26,.45); border-radius: 6px;
  background: rgba(255,250,235,.55); color: #2a1a0e; font: 15px/1.4 Inter, system-ui, sans-serif; }
.mbx-card textarea { min-height: 120px; resize: vertical; }
.mbx-card input:focus, .mbx-card textarea:focus { outline: 2px solid rgba(180,90,30,.55); background: rgba(255,252,242,.8); }
.mbx-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.mbx-send { margin-top: 14px; width: 100%; padding: 11px; border: 1px solid #2a1a0e; border-radius: 8px; cursor: pointer;
  background: linear-gradient(#7a4a24, #55321a); color: #f6ead0; font: 700 16px Palatino, Georgia, serif; letter-spacing: .04em; box-shadow: inset 0 1px 0 rgba(255,220,170,.25); }
.mbx-send:disabled { opacity: .6; cursor: default; }
.mbx-x { position: absolute; top: 6px; right: 8px; width: 34px; height: 34px; border: 0; background: none; color: #4a2f1a; font-size: 24px; cursor: pointer; }
.mbx-msg { min-height: 1.2em; margin: 10px 0 0; font-size: 14px; text-align: center; }
.mbx-msg.ok { color: #2f5a1e; font-weight: 700; } .mbx-msg.err { color: #8a1f12; }
.mbx-msg a { color: inherit; }
