* { box-sizing: border-box; }
:root { --butterfly-cursor: url("assets/cursor-butterfly.svg") 32 32, auto; }
html, body { margin: 0; min-height: 100%; background: #050713; color: #f7fbff; font-family: Arial, Helvetica, sans-serif; }
body { cursor: var(--butterfly-cursor); }
button, a, input { font: inherit; }
.butterfly-cursor { position: fixed; left: 0; top: 0; z-index: 9999; display: none; width: 64px; height: 64px; pointer-events: none; background: url("assets/cursor-butterfly.svg") center / contain no-repeat; opacity: 0; filter: drop-shadow(0 0 5px rgba(255,216,79,.75)) drop-shadow(0 0 12px rgba(160,198,255,.45)); transition: opacity .12s ease, filter .12s ease; will-change: transform; }
.butterfly-cursor.pressing { filter: drop-shadow(0 0 8px rgba(255,216,79,.95)) drop-shadow(0 0 18px rgba(201,155,239,.7)); }
.map-page { min-height: 100vh; overflow: auto; padding: 8px; }
.public-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(1535px, 100%); margin: 0 auto 8px; }
.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.map-wrap { position: relative; width: min(1535px, 100%); aspect-ratio: 1535 / 1024; margin: 0 auto; background: #02040b; border: 1px solid rgba(255,255,255,.3); overflow: hidden; }
.map-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; }
.pins { position: absolute; inset: 0; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border: 1px solid rgba(255,216,79,.72); border-radius: 50%; background: rgba(255,216,79,.24); box-shadow: 0 0 0 2px rgba(0,0,0,.35), 0 0 12px rgba(255,216,79,.7); opacity: .86; cursor: pointer; transition: opacity .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.pin span { position: absolute; left: 50%; bottom: 36px; transform: translateX(-50%) translateY(5px) scale(.96); width: max-content; max-width: 160px; padding: 5px 8px; border: 1px solid rgba(255,216,79,.88); border-radius: 5px; background: rgba(5,7,19,.82); color: white; font-size: 10px; font-weight: 900; line-height: 1.05; text-transform: uppercase; white-space: normal; opacity: 0; pointer-events: none; transition: opacity .16s ease, transform .16s ease; }
.pin:hover, .pin:focus-visible { opacity: 1; background: rgba(255,216,79,.38); border-color: #ffd84f; box-shadow: 0 0 0 2px rgba(0,0,0,.72), 0 0 20px #ffd84f, 0 0 38px rgba(53,215,255,.62); transform: translate(-50%, -50%) scale(1.16); outline: none; }
.pin:hover span, .pin:focus-visible span { opacity: 1; transform: translateX(-50%) translateY(0); }
.map-wrap.pulse-active .pin { opacity: 1; background: rgba(255,216,79,.44); border-color: #fff1a8; box-shadow: 0 0 0 2px rgba(0,0,0,.78), 0 0 22px #ffd84f, 0 0 42px rgba(53,215,255,.7); animation: buttonPulse 1.15s ease-in-out 3; }
.map-wrap.pulse-active .pin span { opacity: 1; transform: translateX(-50%) translateY(0); }
.admin-map .pin { width: auto; height: auto; min-width: 88px; min-height: 30px; padding: 7px 9px; border: 1px solid rgba(255,216,79,.7); border-radius: 6px; background: rgba(5,7,19,.62); opacity: .82; cursor: pointer; }
.admin-map .pin span { position: static; display: block; width: auto; max-width: 130px; padding: 0; border: 0; background: transparent; transform: none; }
.pin.dragging { outline: 3px solid #35d7ff; cursor: grabbing; }
.brand { margin: 0; color: white; font-size: clamp(24px, 3vw, 42px); font-weight: 950; line-height: 1; text-align: right; text-shadow: 0 3px 0 #000, 0 0 20px #35d7ff; }
.admin-link, .pulse-map, .top a, form button, .modal a { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 14px; border-radius: 7px; background: linear-gradient(135deg, #35d7ff, #8b6cff, #ff5aa8); color: white; font-weight: 900; text-decoration: none; border: 0; }
.admin-link { flex: 0 0 auto; }
.pulse-map { cursor: pointer; }
.buildings button { display: block; width: 100%; min-height: 28px; margin-top: 5px; padding: 0 7px; border: 1px solid rgba(255,255,255,.14); border-radius: 6px; background: rgba(255,255,255,.07); color: white; font-size: 11px; font-weight: 800; text-align: left; cursor: pointer; }
.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 18px; background: rgba(0,0,0,.65); }
.modal[hidden] { display: none; }
.modal article { position: relative; width: min(760px, 100%); max-height: 88vh; overflow: auto; padding: 26px; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; background: rgba(5,7,19,.98); }
.modal article > button { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: white; cursor: pointer; }
.links, .media { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 14px; }
.modal #modalText { white-space: pre-line; }
.modal .media { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.card { padding: 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; background: rgba(255,255,255,.06); }
.card b { display: block; margin-bottom: 8px; }
.cover-photo, .uploaded-video { display: block; width: 100%; max-height: 220px; margin: 8px 0 10px; border: 1px solid rgba(255,216,79,.25); border-radius: 8px; background: #000; object-fit: cover; box-shadow: 0 0 18px rgba(53,215,255,.16); }
.uploaded-video { aspect-ratio: 16 / 9; max-height: none; }
.uploaded-audio { display: block; width: 100%; margin: 8px 0 10px; }
.video-frame { width: 100%; aspect-ratio: 16 / 9; margin: 8px 0 10px; overflow: hidden; border: 1px solid rgba(255,216,79,.25); border-radius: 8px; background: #000; box-shadow: 0 0 18px rgba(53,215,255,.18); }
.video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.admin-item-tools { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.12); }
.admin-item-tools input { min-height: 34px; }
.admin-item-tools button { min-height: 34px; padding: 0 10px; border: 0; border-radius: 6px; background: linear-gradient(135deg, #35d7ff, #8b6cff, #ff5aa8); color: white; font-weight: 900; }
.admin-item-tools .danger { background: rgba(255,83,83,.86); }
.admin-page { padding: 16px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.login-panel { min-height: calc(100vh - 92px); display: grid; place-items: center; }
.login-panel[hidden] { display: none; }
.login-panel form { width: min(520px, 100%); padding: 28px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; background: rgba(5,7,19,.88); }
.login-panel p { margin: 0; color: #35d7ff; font-weight: 950; letter-spacing: .16em; text-transform: uppercase; }
.login-panel h2 { margin: 4px 0 8px; }
.login-panel strong { min-height: 20px; color: #ffd84f; }
.admin-grid { display: grid; grid-template-columns: 190px minmax(520px, 1fr) minmax(280px, 360px); gap: 14px; align-items: start; }
.buildings, .admin-grid > section { padding: 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; background: rgba(5,7,19,.88); }
.buildings button.active { border-color: #ffd84f; background: rgba(255,216,79,.16); }
.hint, .status { color: #ffd84f; font-weight: 800; }
form { display: grid; gap: 8px; margin: 10px 0; }
form label { color: #ffd84f; font-size: 12px; font-weight: 900; }
input { width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid rgba(255,255,255,.18); border-radius: 6px; background: rgba(255,255,255,.08); color: white; }
.small-action { min-height: 32px; margin: 0 0 10px; padding: 0 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 7px; background: rgba(255,255,255,.08); color: white; font-weight: 900; cursor: pointer; }
.coord-tools { display: grid; grid-template-columns: 90px 90px auto; gap: 8px; align-items: end; margin: 0 0 10px; }
.coord-tools label { display: grid; gap: 3px; color: #ffd84f; font-size: 12px; font-weight: 900; }
.coord-tools input { min-height: 32px; }
.coord-tools .small-action { margin: 0; }
.admin-map { touch-action: none; user-select: none; }
.admin-map .pins { touch-action: none; }
body, button, a, input, .pin, .admin-map .pin, .buildings button, .small-action, .modal article > button { cursor: var(--butterfly-cursor); }
body[data-admin], body[data-admin] input { cursor: auto !important; }
body[data-admin] button, body[data-admin] a, body[data-admin] .pin, body[data-admin] .buildings button, body[data-admin] .small-action, body[data-admin] .modal article > button { cursor: pointer !important; }
@keyframes buttonPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  45% { transform: translate(-50%, -50%) scale(1.28); }
}
@media (pointer: fine) {
  body.butterfly-ready, body.butterfly-ready * { cursor: none !important; }
  body.butterfly-ready .butterfly-cursor { display: block; }
}
@media (max-width: 900px) { .public-top { align-items: flex-start; flex-direction: column-reverse; } .brand { text-align: left; } .admin-grid { grid-template-columns: 1fr; } .buildings { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; } .admin-item-tools { grid-template-columns: 1fr; } }
