﻿@font-face {
  font-family: 'Cagliostro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/Cagliostro-Regular.ttf') format('truetype');
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, sans-serif; background: #f0f4f8; color: #222; min-height: 100vh; display: flex; flex-direction: column; }
.site-footer { background: #f5c800; min-height: 300px; flex-grow: 1; margin-top: 12px; }
.footer-inner { max-width: 1400px; margin: 0 auto; padding: 24px 32px; display: flex; gap: 24px; }
.footer-inner a { color: #1a3a4a; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }
header { background: #f5c800; color: #1a3a4a; padding: 4px 0; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.header-inner { max-width: 1400px; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; }
.logo { font-family: 'Cagliostro', serif; font-weight: 700; font-size: 30px; cursor: pointer; display: flex; align-items: center; gap: 8px; color: #1a3a4a; text-shadow: -1px -1px 0 rgba(255,255,255,0.6), 1px 1px 0 rgba(0,0,0,0.3); }
.logo-img-wrap { display: flex; background: transparent; }
.logo-img { height: 84px; width: 84px; object-fit: contain; filter: brightness(0) invert(1) sepia(1) hue-rotate(163deg) saturate(55%) brightness(28%) drop-shadow(-1px -1px 0 rgba(255,255,255,0.6)) drop-shadow(1px 1px 0 rgba(0,0,0,0.3)); }
.header-right { display: flex; gap: 8px; align-items: center; }
main { width: 100%; max-width: 1400px; margin: 0 auto; padding: 24px 32px; }
.btn { border: none; border-radius: 8px; padding: 8px 16px; cursor: pointer; font-size: 14px; font-weight: 600; transition: opacity .15s; }
.btn:hover { opacity: .85; }
.btn-primary { background: #1a3a4a; color: #fff; }
.btn-ghost { background: rgba(26,58,74,0.12); color: #1a3a4a; }
.btn-white { background: #1a3a4a; color: #fff; }
.btn-danger { background: none; color: #e53e3e; font-size: 13px; padding: 2px 6px; }
.btn-full { width: 100%; padding: 11px; font-size: 15px; margin-top: 16px; }
.card { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); margin-bottom: 16px; }
label { display: block; font-weight: 600; font-size: 13px; color: #444; margin: 12px 0 4px; }
label.layer-item { display: flex; align-items: center; justify-content: flex-start; gap: 8px; font-size: 14px; font-weight: normal; color: #333; margin: 0 0 8px; cursor: pointer; white-space: nowrap; }
input, textarea { width: 100%; border-radius: 8px; border: 1px solid #ddd; padding: 9px 12px; font-size: 14px; font-family: inherit; transition: border-color .2s; }
input:focus, textarea:focus { outline: none; border-color: #1a3a4a; }
textarea { resize: vertical; min-height: 70px; }
.error { color: #e53e3e; font-size: 13px; margin-bottom: 10px; }
.info-box { background: #eef3ff; border-radius: 8px; padding: 12px; font-size: 14px; color: #444; margin-top: 12px; }
.info-box a { color: #1a3a4a; cursor: pointer; font-weight: 600; }
.search-row { display: flex; gap: 8px; margin-bottom: 8px; }
.search-row input { flex: 1; font-size: 15px; padding: 12px 16px; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.07); }
.search-hint { color: #888; font-size: 12px; margin-bottom: 20px; }
.search-wrap { position: relative; margin-bottom: 20px; }
.search-wrap input { width: 100%; font-size: 15px; padding: 12px 38px 12px 16px; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.07); }
.search-wrap input:placeholder-shown + button#adresClear { display: none; }
.suggest-list { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #dde3f0; border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); z-index: 200; margin-top: 4px; overflow: hidden; }
.suggest-item { padding: 11px 16px; font-size: 14px; cursor: pointer; color: #333; }
.suggest-item:hover, .suggest-item.active { background: #eef3ff; }
.home-map { width: 100%; height: min(788px, calc(100vw - 32px)); border-radius: 12px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.1); z-index: 0; cursor: crosshair; }
.adres-map { width: 100%; height: 180px; border-radius: 8px; margin: 12px 0 16px; }
.recent-item { background: #fff; border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 3px rgba(0,0,0,0.07); transition: background .15s; }
.recent-item:hover { background: #f0f4ff; }
#recentList .recent-item:last-child { margin-bottom: 0; }
.recent-label { font-size: 14px; color: #333; }
.recent-count { font-size: 12px; color: #888; }
.message { border-bottom: 1px solid #f0f0f0; padding-bottom: 12px; margin-bottom: 12px; }
.message:last-of-type { border-bottom: none; }
.msg-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.msg-author { font-weight: 600; color: #1a3a4a; cursor: pointer; font-size: 14px; }
.icon-user { filter: brightness(0) saturate(100%) invert(15%) sepia(37%) saturate(1003%) hue-rotate(171deg) brightness(95%); }
.msg-author:hover { text-decoration: underline; }
.msg-time { color: #bbb; font-size: 12px; }
.msg-period { color: #888; font-size: 12px; margin-left: 8px; }
.msg-badge { background: #c0392b; color: #fff; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 10px; margin-left: 8px; }
.msg-text { font-size: 14px; color: #333; line-height: 1.5; }
.detail-label { padding: 4px 14px 4px 0; color: #888; font-size: 13px; white-space: nowrap; vertical-align: top; }
.notif-badge { background: #c0392b; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 10px; margin-left: 5px; vertical-align: middle; }
.admin-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #eee; }
.admin-msg-row { padding: 10px 0; border-bottom: 1px solid #eee; }
.admin-msg-meta { display: flex; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.admin-msg-text { font-size: 13px; color: #555; white-space: pre-wrap; }
.admin-tab { background: #eee; color: #333; font-size: 13px; padding: 5px 14px; }
.admin-tab.active { background: #1a3a4a; color: #fff; }
.btn-report { background: none; border: none; cursor: pointer; font-size: 13px; padding: 2px 5px; opacity: 0.4; transition: opacity .15s; }
.btn-report:hover { opacity: 1; }
.banned-word-tag { display: inline-flex; align-items: center; background: #fde8e8; color: #c0392b; font-size: 13px; padding: 3px 10px; border-radius: 12px; }
.period-row { display: flex; gap: 12px; margin-top: 10px; }
.period-field { flex: 1; }
.period-field label { display: block; font-weight: 600; font-size: 13px; color: #444; margin-bottom: 4px; }
.period-field input { width: 100%; }
.optional { font-weight: 400; color: #aaa; font-size: 12px; }
.empty { color: #aaa; font-size: 14px; }
.back { background: none; border: none; color: #1a3a4a; cursor: pointer; font-size: 14px; font-weight: 600; margin-bottom: 14px; padding: 0; display: inline-block; }
.profile-avatar { font-size: 52px; text-align: center; margin-bottom: 8px; }
.profile-name { text-align: center; font-size: 22px; font-weight: 700; color: #1e3a5f; margin-bottom: 4px; }
.profile-email { text-align: center; font-size: 14px; color: #555; }
.profile-email a { color: #1a3a4a; }
.profile-sub { text-align: center; font-size: 13px; color: #aaa; margin-top: 6px; }
.contact-requests { background: #fff; border-radius: 12px; padding: 20px 24px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); margin-top: 16px; }
.contact-requests h3 { color: #1e3a5f; margin-bottom: 12px; }
.contact-req { border-bottom: 1px solid #f0f0f0; padding: 12px 0; }
.contact-req:last-child { border-bottom: none; }
.cr-meta { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 14px; }
.cr-msg { font-size: 13px; color: #555; font-style: italic; margin-bottom: 8px; }
.cr-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.adres-title { font-family: 'Cagliostro', serif; font-size: 26px; font-weight: 700; color: #1e3a5f; margin-bottom: 4px; }
.adres-sub { color: #888; font-size: 13px; margin-bottom: 6px; }
.bag-info { font-size: 13px; color: #555; background: #f0f4f8; border-radius: 6px; padding: 4px 10px; display: inline-block; margin-left: calc(1.75em + 10px); margin-bottom: 4px; }
.ext-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 4px 33px; }
.ext-link { font-size: 13px; color: #1a3a4a; background: #f0f4f8; border: 1px solid #d0dce8; border-radius: 6px; padding: 4px 10px; text-decoration: none; white-space: nowrap; transition: background 0.15s, border-color 0.15s; }
.ext-link:hover { background: #dce8f0; border-color: #b0c8d8; }
.credits-list { margin-top: 20px; display: flex; flex-direction: column; gap: 16px; }
.credit-item { background: #f8fafc; border: 1px solid #e0e8f0; border-radius: 8px; padding: 14px 16px; }
.credit-name { font-weight: 700; color: #1a3a4a; margin-bottom: 4px; }
.credit-desc { font-size: 14px; color: #555; margin-bottom: 6px; }
.credit-link { font-size: 13px; color: #1a3a4a; text-decoration: none; border-bottom: 1px solid #b0c8d8; }
.credit-link:hover { border-bottom-color: #1a3a4a; }
.msg-img { max-width: 260px; max-height: 200px; border-radius: 8px; margin-top: 8px; cursor: zoom-in; object-fit: cover; display: block; }
.msg-img.msg-img-full { max-width: 100%; max-height: none; cursor: zoom-out; }
.img-preview { max-width: 200px; max-height: 150px; border-radius: 8px; margin-top: 8px; object-fit: cover; display: block; }
.tooltip-wrap { position: relative; display: inline-block; vertical-align: middle; margin-left: 4px; }
.tooltip-icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: #1a3a4a; color: #fff; font-size: 11px; font-weight: 700; cursor: default; font-style: normal; }
.tooltip-text { display: none; position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); background: #1e3a5f; color: #fff; font-size: 12px; font-weight: 400; line-height: 1.5; padding: 10px 12px; border-radius: 8px; width: 260px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 300; pointer-events: none; white-space: normal; }
.tooltip-wrap:hover .tooltip-text { display: block; }
h2 { font-family: 'Cagliostro', serif; font-size: 31px; color: #1e3a5f; margin-bottom: 6px; }
h3 { font-family: 'Cagliostro', serif; font-size: 23px; color: #1e3a5f; margin-bottom: 10px; }
p { color: #555; line-height: 1.5; }
.intro-text { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); margin: 20px 0; }
.intro-text p { margin-bottom: 14px; }
.intro-text p:last-child { margin-bottom: 0; }
.intro-text ul { margin: 10px 0 14px 20px; color: #555; line-height: 1.7; }
.intro-text strong { font-family: 'Cagliostro', serif; font-weight: 700; font-size: 18px; text-shadow: -1px -1px 0 rgba(255,255,255,0.6), 1px 1px 0 rgba(0,0,0,0.3); }
#recentList h3 { font-family: 'Cagliostro', serif; font-weight: 700; font-size: 24px; text-shadow: -1px -1px 0 rgba(255,255,255,0.6), 1px 1px 0 rgba(0,0,0,0.3); }
.home-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; margin-bottom: 20px; }
.home-left { min-width: 0; }
.home-left .home-map { margin-bottom: 0; }
.home-right { margin: 0; align-self: stretch; }
@media (max-width: 900px) {
  .home-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header-right { flex-direction: column; gap: 4px; }
  .logo { font-size: 22px; }
  .logo-img { height: 60px; width: 60px; }
}
