.ask-page { padding: 0; width: 100%; max-width: none; overflow: hidden; height: 100%; }
html:has(.ask-page) { height: 100%; }
.ask-shell {
  position: relative;
  height: 100dvh;
  overflow: hidden;
}
.ask-map {
  position: absolute;
  inset: 0;
}
.ask-home-row {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ask-home {
  padding: 9px 14px;
  font-size: 13px;
}
.ask-home-logo {
  display: block;
  height: 42px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.ask-home-logo img {
  display: block;
  height: 42px;
  width: auto;
}
.ask-shell.is-panel-open .ask-home-row {
  visibility: hidden;
  pointer-events: none;
}
.ask-map-hint {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  margin: 0;
  max-width: min(560px, calc(100% - 240px));
  padding: 10px 16px;
  border-radius: 16px;
  background: rgba(18, 18, 18, 0.86);
  color: #eee;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.ask-shell.is-panel-open .ask-map-hint {
  visibility: hidden;
}
@media (max-width: 640px) {
  .ask-map-hint {
    top: 56px;
    max-width: calc(100% - 24px);
    font-size: 13px;
  }
}
.ask-map #map {
  position: absolute;
  inset: 0;
  background: #1a1a1a;
}
.ask-map .leaflet-container { background: #1a1a1a; font-family: inherit; }
.flag-icon {
  background: none !important;
  border: none !important;
  overflow: visible !important;
}
.flag-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  cursor: pointer;
}
.flag-pin .flag-row {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.flag-pin .flag { font-size: 28px; line-height: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,.45)); }
.flag-count {
  position: absolute;
  top: -7px;
  right: -11px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #34c759;
  color: #101010;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.flag-pin .cname {
  margin-top: 2px;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(18,18,18,.86);
  color: #eee;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.flag-pin.is-on .cname { background: #34c759; color: #101010; }

.ask-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  width: min(420px, 92vw);
  display: flex;
  flex-direction: column;
  background: #161616;
  border-left: 1px solid #303030;
  min-height: 0;
  transform: translateX(110%);
  visibility: hidden;
  pointer-events: none;
  box-shadow: none;
}
.ask-panel.is-prep {
  transition: none;
  transform: translateX(110%);
  visibility: hidden;
  pointer-events: none;
}
.ask-panel.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.35);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.45s;
}
.ask-panel.is-leaving {
  transform: translateX(110%);
  visibility: hidden;
  pointer-events: none;
  box-shadow: none;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
}
.ask-toolbar {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid #303030;
  flex-wrap: wrap;
}
.ask-toolbar .button { padding: 9px 12px; font-size: 13px; }
.ask-panel-body {
  overflow: auto;
  padding: 16px 16px 96px;
  flex: 1;
}
.ask-fab {
  position: absolute;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 2;
  width: 56px;
  height: 56px;
  padding: 0;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: #34c759;
  color: #101010;
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}
.ask-fab:hover { filter: brightness(1.06); }
.ask-fab:active { transform: scale(0.96); }
.ask-fab.is-hidden {
  visibility: hidden;
  pointer-events: none;
}
.ask-empty { color: #888; padding: 28px 8px; text-align: center; }
.ask-country { margin: 0 0 14px; font-size: 22px; }
.ask-meta { color: #888; font-size: 13px; margin-bottom: 16px; }
.post-card {
  background: #1e1e1e;
  border: 1px solid #303030;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.post-nick { font-weight: 700; color: #eee; }
.post-time { color: #777; font-size: 12px; margin-left: 8px; }
.post-text { margin: 8px 0 10px; white-space: pre-wrap; word-break: break-word; }
.post-actions, .reply-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.post-actions button, .reply-actions button, .gate button {
  background: transparent;
  color: #9ad7a8;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  padding: 5px 9px;
  cursor: pointer;
  font-size: 12px;
}
.post-actions button.danger { color: #f0a0a0; }
.replies { margin-top: 10px; padding-top: 8px; border-top: 1px solid #2a2a2a; }
.reply { margin: 8px 0; font-size: 14px; }
.composer textarea, .reply-box textarea {
  width: 100%;
  min-height: 88px;
  background: #121212;
  color: #eee;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  padding: 10px;
  font: inherit;
  resize: vertical;
}
.composer { margin-bottom: 16px; }
.composer .button, .reply-box .button { margin-top: 8px; }
.gate {
  background: #241818;
  border: 1px solid #5a3030;
  border-radius: 12px;
  padding: 16px;
  color: #eee;
}
.auth-note { color: #aaa; font-size: 13px; margin: 8px 0 14px; }

@media (max-width: 860px) {
  .ask-panel { width: min(100%, 420px); }
}
@media (prefers-reduced-motion: reduce) {
  .ask-panel.is-open,
  .ask-panel.is-leaving {
    transition: none;
  }
}
