.note-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.note-fields select {
  width: 100%;
  font: inherit;
}
.note-fields > div { min-width: 0; }
.note-fields:has(#compose-icon-field[hidden]) { grid-template-columns: minmax(0, 1fr); }
.noticoin-map-icon { width: 1em; height: 1em; flex: none; vertical-align: -.12em; }
.note-option-icon, .point-symbol {
  color: var(--glyph-dark, #d6c8fc);
  background: color-mix(in srgb, currentColor 15%, var(--atlas-field, #0d1528));
}
.atlas-light .note-option-icon, .atlas-light .point-symbol {
  color: var(--glyph-light, #425d9d);
}
.point-symbol .noticoin-map-icon { width: 19px; height: 19px; }
.chip .noticoin-map-icon { margin-inline-end: 5px; }
.detail-category .noticoin-map-icon { margin-inline-end: 7px; }
.place-note-price .noticoin-map-icon { margin-inline-end: 4px; }
.coordinate-button {
  color: var(--atlas-ink, #e0e8fa);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 26px;
  padding: 3px 6px;
  transition: background-color 150ms ease, color 150ms ease;
}
.map-footer .coordinate-button { pointer-events: auto; }
.coordinate-button .noticoin-map-icon { width: 14px; height: 14px; }
.coordinate-button:hover, .coordinate-button[data-copied] {
  color: var(--atlas-blue, #c8b5ff);
  background: var(--atlas-selected, #252c44);
}
.coordinate-icon-button {
  border: 1px solid var(--atlas-border, #ffffff25);
  min-height: 34px;
  min-width: 34px;
}
.compose-coordinate-row { display: flex; gap: 8px; align-items: stretch; margin-top: 6px; }
.compose-coordinate-row .location-field { flex: 1; min-width: 0; margin: 0; }
.compose-coordinate-row .coordinate-icon-button { margin: 0; }
.compose-coordinate-row .secondary {
  flex: 1;
  justify-content: start;
  min-height: 36px;
  padding: 5px 10px;
}
#manual-coordinates { gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
#manual-coordinates input { font-variant-numeric: tabular-nums; }
.wallet-map #manual-coordinates input[aria-invalid="true"] { border-color: #c65e70; }
.detail-coords { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; }
.detail-coords .coordinate-button { text-align: start; }
.venue-modal #copy-venue-coordinates { margin-inline-start: auto; margin-inline-end: 8px; }
.source-link { color: var(--atlas-blue, #c8b5ff); text-decoration: underline; text-underline-offset: 3px; }

@supports (appearance: base-select) {
  .note-select, .note-select::picker(select) { appearance: base-select; }
  .note-select { min-height: 47px; cursor: pointer; gap: 6px; }
  .note-select selectedcontent, .note-select option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  .note-select selectedcontent { gap: 7px; }
  .note-select selectedcontent .note-option-price { display: none; }
  .note-option-icon { display: grid; place-items: center; width: 27px; height: 27px; flex: none; }
  .note-option-icon .noticoin-map-icon { width: 16px; height: 16px; }
  .note-option-label { flex: 1; line-height: 1.25; overflow-wrap: anywhere; }
  .note-option-price { color: var(--atlas-muted, #aab7ce); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .note-select::picker-icon {
    color: var(--atlas-muted, #aab7ce);
    margin-inline-start: auto;
    transition: rotate 160ms ease, color 160ms ease;
  }
  .note-select:open::picker-icon { rotate: 180deg; color: var(--atlas-blue, #c8b5ff); }
  .note-select::picker(select) {
    min-width: anchor-size(width);
    max-height: min(335px, 60dvh);
    overflow-y: auto;
    overscroll-behavior: contain;
    margin-block: 5px;
    padding: 5px;
    border: 1px solid var(--atlas-border, #3d4965);
    background: var(--atlas-surface, #111a2e);
    color: var(--atlas-ink, #edf1ff);
    opacity: 0;
    translate: 0 -5px;
    transition: opacity 145ms ease-out, translate 145ms ease-out, display 145ms, overlay 145ms;
    transition-behavior: allow-discrete;
  }
  .note-select:open::picker(select) { opacity: 1; translate: 0 0; }
  @starting-style {
    .note-select:open::picker(select) { opacity: 0; translate: 0 -5px; }
  }
  .note-select option {
    padding: 6px 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease;
  }
  .note-select option::checkmark { order: 1; color: var(--atlas-blue, #c8b5ff); }
  .note-select option:checked { background: var(--atlas-selected, #243354); font-weight: 600; }
  .note-select option:hover, .note-select option:focus-visible {
    background: var(--atlas-field, #202b44);
    border-color: var(--atlas-blue, #c8b5ff);
    outline: 0;
  }
}
.note-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  cursor: pointer;
}
.note-toggle input { accent-color: #8067e8; }
.pin-visibility { padding: 0; margin: 0 0 12px; min-width: 0; border: 0; }
.pin-visibility legend { padding: 0; }
.visibility-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.visibility-options label { position: relative; cursor: pointer; }
.visibility-options input { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); }
.visibility-tile {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px;
  min-height: 61px;
  border: 1px solid var(--atlas-border);
  background: var(--atlas-field);
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}
.visibility-tile strong, .visibility-tile small { display: block; overflow-wrap: anywhere; }
.visibility-tile strong { font-size: 14px; }
.visibility-tile small { color: var(--atlas-muted); font-size: 11px; }
.visibility-icon {
  display: grid;
  place-items: center;
  flex: 0 0 31px;
  height: 31px;
  color: var(--atlas-muted);
  border: 1px solid var(--atlas-border);
}
.visibility-options input:checked + .visibility-tile { border-color: var(--atlas-blue); background: var(--atlas-selected); }
.visibility-options input:checked + .visibility-tile .visibility-icon { background: var(--atlas-blue); color: var(--atlas-surface); border-color: transparent; }
.visibility-options input:focus-visible + .visibility-tile { outline: 2px solid var(--atlas-blue); outline-offset: 2px; }
.visibility-options input:disabled + .visibility-tile { opacity: .54; cursor: default; }
.visibility-options input:enabled + .visibility-tile:hover { border-color: var(--atlas-blue); }
#private-pin-hint { margin: 7px 0 0; }
.private-pin-panel section, .private-pin-panel form, #private-share-output { margin-bottom: 15px; }
.private-pin-panel textarea { font-family: ui-monospace, Consolas, monospace; resize: vertical; }
.private-pin-code-row { display: flex; gap: 8px; }
.private-pin-code-row input { flex: 1; min-width: 0; margin: 0; font-family: ui-monospace, Consolas, monospace; }
#private-pins-list { max-height: 190px; overflow-y: auto; }
#private-pins-list .place-note { align-items: center; }
#private-lock { margin-top: 12px; }
#private-generate-passphrase { min-height: 35px; }
#attached-location { display: block; margin: 0; overflow-wrap: anywhere; }
.note-publish {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--atlas-border, #ffffff22);
}
.note-publish > span { display: grid; gap: 2px; font-size: .8rem; }
.note-publish:has(#publication-price[hidden]) { justify-content: flex-end; }
.note-publish strong { font-size: 1rem; font-variant-numeric: tabular-nums; }
#compose .modal-heading, .invoice-modal .modal-heading {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--atlas-surface, #131c2b);
  box-shadow: 0 -18px 0 18px var(--atlas-surface, #131c2b);
}
.invoice-modal .modal-heading .close-btn { top: 0; }
.modal.map-panel-dialog { width: min(510px, calc(100vw - 24px)); padding: 14px; }
.map-panel-dialog [hidden] { display: none !important; }
.map-panel-dialog .map-panel-heading {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 8px 8px 8px 13px;
  border: 1px solid var(--atlas-border, #3d4965);
  background: var(--atlas-surface, #131c2b);
}
.map-panel-heading h2 { flex: 1; min-width: 0; margin: 0; font-size: 1.25rem; overflow-wrap: anywhere; }
.map-panel-heading .close-btn, .map-panel-heading .panel-icon-button {
  position: static;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--atlas-border, #3d4965);
  color: var(--atlas-muted, #aab7ce);
}
.map-panel-heading .panel-icon-button .noticoin-map-icon, .map-panel-heading .close-btn .noticoin-map-icon { width: 17px; height: 17px; }
.map-panel-stack { display: grid; gap: 9px; }
.map-panel-frame {
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid var(--atlas-border, #3d4965);
  background: var(--atlas-field, #0d1528);
}
.map-panel-frame > h3 { margin: 0 0 8px; color: var(--atlas-ink, #edf1ff); font-size: .92rem; }
.map-panel-frame > .field-label:first-child { margin-top: 0; }
.map-panel-frame > :last-child { margin-bottom: 0; }
.map-panel-frame > p { margin: 0; overflow-wrap: anywhere; }
#invoice-list-status { margin: 0 0 9px; }
.map-panel-dialog .invoice-destination { display: flex; align-items: center; gap: 8px; text-align: start; }
.invoice-destination > span:first-child { flex: 1; }
.invoice-count { padding: 2px 7px; background: var(--atlas-selected, #243354); color: var(--atlas-blue, #b5c2ff); font-variant-numeric: tabular-nums; }
.invoice-entries { display: grid; gap: 7px; }
.invoice-entry {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  text-align: start;
  border: 1px solid var(--atlas-border, #3d4965);
  background: var(--atlas-surface, #131c2b);
  color: var(--atlas-ink, #edf1ff);
  overflow-wrap: anywhere;
}
button.invoice-entry:hover { background: var(--atlas-selected, #243354); }
.invoice-entry strong { font-size: .9rem; font-weight: 650; }
.invoice-entry small { color: var(--atlas-muted, #aab7ce); font-variant-numeric: tabular-nums; }
.note-reader { display: grid; gap: 12px; }
.map-panel-dialog .purchased-note-text { margin: 0; max-height: none; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }
.note-reader #retry-note { justify-self: start; }
#about-modal .about-copy p { color: var(--atlas-muted, #aab7ce); }
.pin-note-heading, .wallet-map .pin-note-body {
  padding: 9px 11px;
  border: 1px solid var(--atlas-border, #3d4965);
  background: var(--atlas-field, #0d1528);
}
.pin-note-heading { margin: 0 0 8px; padding-inline-end: 45px; }
.wallet-map #detail-close { top: 22px; right: 23px; }
.wallet-map .pin-note-heading h2 { margin: 4px 0 0; overflow-wrap: anywhere; }
.wallet-map .pin-note-body { margin-bottom: 8px; overflow-wrap: anywhere; white-space: pre-wrap; }
#compose .modal-heading {
  justify-content: space-between;
  align-items: flex-start;
  padding-right: 0;
}
#compose .compose-close {
  position: static;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--atlas-border, #596a85);
  font-size: 19px;
}
.map-context {
  position: fixed;
  z-index: 18;
  display: grid;
  width: min(250px, calc(100vw - 16px));
  padding: 5px;
  border: 1px solid var(--atlas-border);
  background: var(--atlas-surface);
  color: var(--atlas-ink);
  font-size: .86rem;
}
.map-context-target {
  position: fixed;
  z-index: 17;
  width: 24px;
  height: 24px;
  border: 2px solid #ffce7e;
  border-radius: 50%;
  background: #1a1d29a8;
  box-shadow: 0 0 0 1px #171d2b;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.map-context-target::before, .map-context-target::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  background: #ffce7e;
  transform: translate(-50%, -50%);
}
.map-context-target::before { width: 32px; height: 1px; }
.map-context-target::after { width: 1px; height: 32px; }
.note-search-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 8px 14px 4px; }
.note-search-controls label { min-width: 0; }
.note-search-controls .note-query-field { grid-column: 1 / -1; }
.note-search-controls label > span { color: var(--atlas-muted); display: block; font-size: .78rem; margin-bottom: 4px; }
.note-search-controls .text-input { width: 100%; min-width: 0; min-height: 34px; font-size: .79rem; padding: 5px 7px; }
.note-search-controls p { grid-column: 1 / -1; margin: 0; }
.note-search-controls .note-select .note-option-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-search-controls option .note-option-label { overflow: visible; text-overflow: clip; white-space: normal; }
.country-flag { display: block; flex: 0 0 18px; width: 18px; height: 14px; outline: 1px solid var(--atlas-border, #3d4965); }
.note-search-controls .note-select > option > .noticoin-map-icon,
.note-search-controls .note-select selectedcontent > .noticoin-map-icon { width: 17px; height: 17px; color: var(--atlas-muted); }
.note-search-controls .note-option-icon { width: 20px; height: 20px; }
.note-search-controls .note-option-icon .noticoin-map-icon { width: 13px; height: 13px; }
.note-result-pages { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding: 4px 6px 8px; }
.note-result-pages .secondary { padding: 4px 8px; min-height: 30px; font-size: .77rem; }
.map-context-coordinates {
  padding: 6px 9px;
  color: var(--atlas-muted);
  border-bottom: 1px solid var(--atlas-border);
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}
.map-context button {
  display: flex;
  gap: 9px;
  align-items: center;
  text-align: start;
  padding: 8px 9px;
  min-height: 35px;
  background: transparent;
}
.map-context button:hover, .map-context button:focus-visible {
  color: var(--atlas-ink);
  background: var(--atlas-selected);
  outline: none;
}
.purchased-note-row {
  display: flex;
  align-items: stretch;
  gap: 5px;
}
.purchased-note-row .invoice-entry { flex: 1; min-width: 0; }
.purchased-note-delete {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  align-self: center;
  height: 34px;
  padding: 0;
  border: 1px solid var(--atlas-border, #3d4965);
  background: var(--atlas-surface, #131c2b);
  color: var(--atlas-muted, #9fb0ca);
}
.purchased-note-delete:hover, .purchased-note-delete:focus-visible {
  color: var(--atlas-ink, #eef3fb);
  background: var(--atlas-selected, #293345);
}
.purchased-note-delete .noticoin-map-icon { width: 16px; height: 16px; }
#toast[data-tone="success"] {
  color: #d3f8e3;
  background: #143429;
  border-color: #399776;
}
.atlas-light #toast[data-tone="success"] {
  color: #103c2a;
  background: #ddf4e8;
  border-color: #4c9979;
}
#toast[data-tone="success"] > .noticoin-map-icon { margin-inline-end: .45em; }
.map-notices {
  position: fixed;
  z-index: 10;
  top: 78px;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 28px));
  display: grid;
  justify-items: center;
  gap: 8px;
  pointer-events: none;
}
.map-payment-status {
  max-width: 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 13px 16px;
  color: var(--atlas-ink, #eef3fb);
  background: var(--atlas-surface, #131c2b);
  border: 1px solid var(--atlas-border, #596a85);
  border-inline-start: 3px solid var(--atlas-blue, #81b8ff);
  pointer-events: auto;
}
.map-payment-status[hidden] { display: none; }
.map-payment-status strong { font-size: 1rem; }
.map-payment-status p { margin: 4px 0 0; color: var(--atlas-muted, #aab7ce); font-size: .8rem; overflow-wrap: anywhere; }
.map-payment-status button { flex-shrink: 0; }
.map-receipt-status {
  color: #d3f8e3;
  background: #143429;
  border-color: #399776;
}
.atlas-light .map-receipt-status {
  color: #103c2a;
  background: #ddf4e8;
  border-color: #4c9979;
}
.map-receipt-status p { color: inherit; }
.receipt-actions { display: flex; flex-wrap: wrap; gap: 6px; }
@media (prefers-reduced-motion: no-preference) {
  #pin-icon .pulsing-pin-icon { border-radius: 50%; animation: pin-ring-preview 1.85s ease-in-out infinite; }
  #pin-icon .pulsing-pin-icon .noticoin-map-icon { animation: pin-icon-preview 1.85s ease-in-out infinite; }
}
@keyframes pin-icon-preview {
  0%, 52%, 100% { opacity: .46; transform: scale(.96); }
  14%, 30% { opacity: 1; transform: scale(1.14); }
}
@keyframes pin-ring-preview {
  0%, 52%, 100% { box-shadow: 0 0 0 1px transparent; }
  14%, 30% { box-shadow: 0 0 0 2px currentColor, 0 0 10px currentColor; }
}
.place-notes {
  border-block: 1px solid var(--atlas-border, #ffffff22);
  padding: 12px 0;
  margin-bottom: 14px;
}
.place-notes-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.place-notes-heading h3, .donation-panel h3 { margin: 0; font-size: .92rem; }
.place-notes-heading button { padding: 7px 12px; min-height: 36px; }
.place-note {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  text-align: start;
  gap: 12px;
  width: 100%;
  margin-top: 7px;
  padding: 9px 10px;
  border: 1px solid var(--atlas-border, #ffffff22);
  background: transparent;
  overflow-wrap: anywhere;
}
.place-note:hover { background: var(--atlas-hover, #ffffff13); }
.place-note small { flex: none; color: var(--atlas-muted, #aab7ce); font-variant-numeric: tabular-nums; }
.donation-panel { padding-top: 14px; }
.donation-panel p { margin: 7px 0; }
.donation-address-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.donation-address-row select { min-width: 0; width: 100%; }
.donation-address-preview { overflow-wrap: anywhere; user-select: text; }
.donation-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.donation-presets a { min-height: 34px; padding: 6px 9px; font-size: .78rem; }
#secret-receipt {
  border: 1px solid var(--atlas-border, #ffffff22);
  margin: 12px 0 0;
  max-height: 200px;
  overflow: auto;
  overflow-wrap: anywhere;
  padding: 12px;
  white-space: pre-wrap;
  text-align: start;
}
@media (max-width: 440px) {
  .note-fields { grid-template-columns: 1fr; gap: 0; }
  .donation-address-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  #private-pins-open span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .note-select::picker(select), .note-select::picker-icon,
  .note-select option, .coordinate-button, .visibility-tile { transition: none; }
}
