/* css/style.css - Sleek & Modern Dark Glassmorphism UI Style System */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-dark: #0b0f19;
  --panel-bg: rgba(18, 24, 38, 0.78);
  --panel-border: rgba(255, 255, 255, 0.12);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --warning-red: #ff4e50;
  --warning-orange: #f9d423;
  --warning-gradient: linear-gradient(135deg, #ff4e50 0%, #f9d423 100%);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-sleek: 0 12px 32px rgba(0, 0, 0, 0.45);
  --font-main: 'Plus Jakarta Sans', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  height: var(--app-height, 100dvh);
  overflow: hidden;
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-primary);
}

/* 3D Flip App Container */
.flip-app-container {
  perspective: 1400px;
  position: relative;
  width: 100vw;
  height: 100%;
  height: var(--app-height, 100dvh);
  overflow: hidden;
  background-color: var(--bg-dark);
}

.flipper {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.flipper.flipped {
  transform: rotateY(180deg);
}

.card-side {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* [앞면] 지도 뷰 기본 활성 */
.card-front {
  z-index: 10;
  transform: rotateY(0deg);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

/* [뒷면] 라운지 뷰 기본 비활성 */
.card-back {
  z-index: 1;
  transform: rotateY(180deg);
  background-color: var(--bg-dark);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

/* [플립 상태] 뒤집혔을 때: 뒷면 활성화, 앞면 완전 비활성화 */
.flipper.flipped .card-front {
  z-index: 1 !important;
  pointer-events: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

.flipper.flipped .card-back {
  z-index: 10 !important;
  pointer-events: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Map Container */
#map {
  width: 100%;
  height: 100%;
  z-index: 1;
  background-color: #1a202c;
}

/* Header Bar Overlay */
.top-bar {
  position: absolute;
  top: 16px;
  left: 74px;
  right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  padding: 10px 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sleek);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

.top-bar-hidden {
  transform: translateY(-150%);
  opacity: 0;
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.3px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-sleek {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--panel-border);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.btn-sleek:hover,
.btn-sleek:active {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.btn-ai-summary {
  background: var(--warning-gradient);
  color: #0b0f19;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(255, 78, 80, 0.35);
}

.btn-ai-summary:hover {
  filter: brightness(1.1);
}

/* Floating Overlay: Search in this area */
.floating-search-overlay {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 9;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-search-overlay.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.btn-search-area {
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 242, 254, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Floating GPS Button */
.btn-gps {
  position: absolute;
  bottom: calc(240px + env(safe-area-inset-bottom, 0px));
  right: 16px;
  z-index: 15;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-sleek);
  cursor: pointer;
  transition: bottom 0.3s cubic-bezier(0.25, 1, 0.5, 1), transform 0.2s ease;
}

.btn-gps.gps-down {
  bottom: calc(44px + max(8px, env(safe-area-inset-bottom, 0px)));
}

/* Bottom Sheet Filter Panel */
.bottom-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: var(--panel-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--panel-border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom, 0px)) 18px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: min(65dvh, 420px);
  overflow-y: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.bottom-sheet::-webkit-scrollbar {
  display: none;
}

.bottom-sheet.collapsed {
  transform: translateY(calc(100% - 30px - max(8px, env(safe-area-inset-bottom, 0px))));
}

.drag-area {
  display: flex;
  justify-content: center;
  padding: 6px 0;
  margin-top: -4px;
  cursor: pointer;
  flex-shrink: 0;
}

.drag-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.filter-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.results-badge {
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.3);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Category Filter Chips */
.category-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  flex-shrink: 0;
}

.category-chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--panel-border);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip.active {
  background: var(--accent-gradient);
  color: #0b0f19;
  border-color: transparent;
  font-weight: 700;
}

/* Sliders Section */
.sliders-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 2px;
  flex-shrink: 0;
}

.slider-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-primary);
  font-weight: 500;
}

.slider-val {
  color: var(--accent-cyan);
  font-weight: 700;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.6);
  transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.25);
}

/* Modal Windows */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active,
.modal-backdrop[style*="display: flex"],
.modal-backdrop[style*="display:flex"],
.modal-backdrop[style*="display: block"],
.modal-backdrop[style*="display:block"] {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.modal-content {
  background: #141a28;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sleek);
  overflow: hidden;
}

/* ======================================================== */
/* [PREMIUM] Map Place Selection Banner (For Lounge Linking) */
/* ======================================================== */
.map-place-selection-banner {
  position: absolute;
  top: 68px;
  left: 14px;
  right: 14px;
  z-index: 999;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid #00f2fe;
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 242, 254, 0.25);
  animation: slideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.selection-banner-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.selection-banner-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #00f2fe;
  letter-spacing: -0.01em;
}

.selection-banner-msg {
  font-size: 0.8rem;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.3;
}

.btn-cancel-selection {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #cbd5e1;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-cancel-selection:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

/* ======================================================== */
/* [PREMIUM] Write Post Modal - Modern Responsive Lounge UI  */
/* ======================================================== */
.modal-write-content {
  width: 94%;
  max-width: 500px;
  max-height: 90vh;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 242, 254, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  0% { transform: scale(0.94); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Write Modal Header */
.write-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.8);
  flex-shrink: 0;
}

.write-modal-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.write-modal-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.01em;
  margin: 0;
}

.write-point-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: #00f2fe;
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.25);
  padding: 2px 7px;
  border-radius: 12px;
  letter-spacing: -0.02em;
}

.write-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.write-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.write-modal-submit {
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  border: none;
  color: #090d16;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 7px 18px;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 242, 254, 0.35);
  transition: all 0.2s ease;
}

.write-modal-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 242, 254, 0.45);
}

.write-modal-submit:active {
  transform: scale(0.96);
}

/* Write Modal Body */
.write-modal-body {
  padding: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

/* Post Type Segment Control */
.write-type-segment {
  display: flex;
  padding: 8px 12px;
  background: rgba(11, 15, 25, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 6px;
}

.write-type-opt {
  flex: 1;
  cursor: pointer;
  min-width: 0;
}

.write-type-opt input[type="radio"] {
  display: none;
}

.write-type-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 10px;
  font-size: clamp(0.72rem, 2.4vw, 0.82rem);
  font-weight: 600;
  color: #94a3b8;
  background: transparent;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
  border: 1px solid transparent;
}

.write-type-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
}

.write-type-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.write-type-opt input[type="radio"]:checked + .write-type-label {
  background: rgba(0, 242, 254, 0.12);
  border-color: rgba(0, 242, 254, 0.3);
  color: #00f2fe;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 242, 254, 0.15);
}

/* Sections */
.write-section {
  padding: 10px 16px 0 16px;
}

.write-section-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: -0.01em;
}

/* Tags Row */
.write-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qtag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.qtag:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.qtag.active {
  background: rgba(0, 242, 254, 0.12);
  border-color: rgba(0, 242, 254, 0.45);
  color: #00f2fe;
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.15);
}

/* Smart Templates / Pre-fills Row */
.write-template-section {
  padding-top: 8px;
}

.write-templates-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.write-templates-row::-webkit-scrollbar {
  display: none;
}

.template-qchip {
  background: rgba(0, 242, 254, 0.04);
  border: 1px solid rgba(0, 242, 254, 0.16);
  color: #cbd5e1;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.template-qchip:hover {
  background: rgba(0, 242, 254, 0.1);
  border-color: rgba(0, 242, 254, 0.35);
  color: #00f2fe;
  transform: translateY(-1px);
}

.template-qchip:active {
  transform: scale(0.96);
}

/* Textarea & Footer */
.write-content-section {
  padding-top: 8px;
}

.write-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #f8fafc;
  font-size: 0.92rem;
  line-height: 1.55;
  resize: none;
  outline: none;
  font-family: inherit;
  padding: 10px 12px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.write-textarea:focus {
  border-color: rgba(0, 242, 254, 0.4);
  background: rgba(0, 0, 0, 0.32);
}

.write-textarea::placeholder {
  color: #475569;
  font-size: 0.86rem;
}

.write-textarea-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  font-size: 0.72rem;
  color: #64748b;
  padding: 0 2px;
}

.write-guide-msg {
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.write-char-count {
  font-variant-numeric: tabular-nums;
  color: #94a3b8;
  font-weight: 600;
  flex-shrink: 0;
  margin-left: 8px;
}

/* Place Tag Row & Required Banner */
.write-place-section {
  padding-top: 10px;
}

.write-place-required-banner {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fadeIn 0.2s ease;
}

.write-place-locked-banner {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeIn 0.2s ease;
}

.locked-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.locked-text {
  font-size: 0.76rem;
  color: #bfdbfe;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.locked-sub {
  font-size: 0.7rem;
  color: #93c5fd;
  opacity: 0.85;
}

.banner-text {
  font-size: 0.78rem;
  color: #fde68a;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
  font-weight: 500;
}

.banner-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.btn-go-map-select {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0f172a;
  border: none;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.3);
  transition: all 0.2s ease;
  text-align: center;
}

.btn-go-map-select:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(245, 158, 11, 0.4);
}

.write-place-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 6px 10px;
  transition: all 0.2s ease;
}

.write-place-row.has-place {
  background: rgba(0, 242, 254, 0.06);
  border-color: rgba(0, 242, 254, 0.3);
}

.write-place-row.place-required-warning {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.05);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.write-place-cat-badge {
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid rgba(0, 242, 254, 0.35);
  color: #00f2fe;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.write-place-icon {
  font-size: 1rem;
  flex: 0 0 auto;
}

.write-place-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #f8fafc;
  font-size: 0.82rem;
  outline: none;
  font-family: inherit;
  min-width: 0;
}

.write-place-input::placeholder {
  color: #64748b;
}

.btn-use-loc-tag {
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.25);
  color: #00f2fe;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-use-loc-tag:hover {
  background: rgba(0, 242, 254, 0.2);
  color: #fff;
}

.write-place-clear {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #94a3b8;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.68rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.write-place-clear:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* Meetup Extra Fields */
.write-meetup-extra {
  margin-top: 10px;
  padding: 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(168, 85, 247, 0.04);
}

.write-meetup-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.write-meetup-time-field {
  width: 100%;
}

.write-time-chips {
  display: flex;
  gap: 4px;
  margin-top: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.write-time-chips::-webkit-scrollbar {
  display: none;
}

.time-qchip {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: #d8b4fe;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.time-qchip:hover {
  background: rgba(168, 85, 247, 0.22);
  color: #fff;
}

.write-meetup-subgroup {
  display: flex;
  gap: 10px;
}

.write-meetup-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.write-field-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #a855f7;
  text-transform: uppercase;
}

.write-field-input,
.write-field-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #f8fafc;
  font-size: 0.82rem;
  padding: 6px 10px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.write-field-input:focus,
.write-field-select:focus {
  border-color: rgba(168, 85, 247, 0.5);
}

.write-field-input::placeholder {
  color: #64748b;
}

/* Photo Upload - 2-Row Layout */
.write-photo-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 16px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px !important;
  margin-top: 8px;
}

.write-photo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.write-photo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.write-photo-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(0, 242, 254, 0.3);
  color: #fff;
}

.photo-counter-badge {
  font-size: 0.7rem;
  color: #00f2fe;
  background: rgba(0, 242, 254, 0.12);
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 700;
}

.write-limit-badge {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}

.write-photo-previews {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px 0;
  scrollbar-width: none;
}

.write-photo-previews::-webkit-scrollbar {
  display: none;
}

.preview-thumb-box {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.preview-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-remove-thumb {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-remove-thumb:hover {
  background: rgba(239, 68, 68, 0.9);
  border-color: #ef4444;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary);
}

/* AI Report Markdown Styling */
.ai-report h3 {
  font-size: 1rem;
  color: var(--warning-orange);
  margin-top: 14px;
  margin-bottom: 8px;
}

.ai-report p,
.ai-report li {
  margin-bottom: 8px;
  color: #cbd5e1;
}

.ai-report ul {
  padding-left: 20px;
}

/* Guard View for Denied Geolocation */
.guard-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  gap: 16px;
}

.guard-icon {
  font-size: 3.5rem;
  color: var(--warning-red);
}

.guard-title {
  font-size: 1.4rem;
  font-weight: 700;
}

.guard-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 320px;
  line-height: 1.5;
}

.guard-btn {
  background: var(--accent-gradient);
  color: #0b0f19;
  border: none;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 700;
  cursor: pointer;
}

/* Loading Spinner for Search Progress */
.loading-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(0, 242, 254, 0.3);
  border-radius: 50%;
  border-top-color: var(--accent-cyan);
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Long-Press Active Visual Feedback on Chips */
.category-chips,
.chip,
.modal-backdrop,
.modal-content {
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  -khtml-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

.chip {
  position: relative;
  touch-action: manipulation;
}

.chip.pressing {
  transform: scale(0.92);
  filter: brightness(1.3);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.6);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

/* Sub-category Modal Specifics */
.modal-sub-content {
  max-width: 520px;
  width: 90%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.modal-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
  font-weight: 400;
}

.modal-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--panel-border);
}

.sub-tool-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.2s;
}

.sub-tool-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.sub-count-badge {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.sub-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  padding: 16px 20px;
  max-height: 50vh;
  overflow-y: auto;
}

.sub-cat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  font-size: 0.82rem;
}

.sub-cat-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 242, 254, 0.3);
}

.sub-cat-item.checked {
  background: rgba(0, 242, 254, 0.12);
  border-color: var(--accent-cyan);
  color: #ffffff;
}

.sub-cat-item input[type="checkbox"] {
  accent-color: var(--accent-cyan);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.sub-category-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--panel-border);
  background: rgba(11, 15, 25, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--panel-border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-gradient);
  border: none;
  color: #0b0f19;
  padding: 8px 20px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

/* Map Place Marker Name Label */
.place-marker-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  pointer-events: auto;
}

.place-marker-label {
  font-size: 11px;
  font-weight: 600;
  color: #0f172a;
  background-color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.9), 0 0 4px rgba(255, 255, 255, 0.9);
  padding: 1px 4px;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  margin-top: 2px;
  white-space: nowrap;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  pointer-events: none;
  user-select: none;
  line-height: 1.2;
}

/* Leaflet Place Marker Tooltip */
.place-marker-tooltip {
  background: rgba(255, 255, 255, 0.72) !important;
  color: #0f172a !important;
  font-family: var(--font-main, system-ui, sans-serif) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  border-radius: 4px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12) !important;
  padding: 1px 4px !important;
  max-width: 110px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-align: center !important;
  pointer-events: none !important;
  backdrop-filter: blur(3px) !important;
  -webkit-backdrop-filter: blur(3px) !important;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.9), 0 0 4px rgba(255, 255, 255, 0.9) !important;
}

.place-marker-tooltip::before {
  display: none !important;
}

/* Public Memo Place Marker Style (Soft Neon Emerald Halo Glow) */
.place-marker-pin-memo {
  position: relative;
  box-shadow: 0 0 8px 2px rgba(16, 185, 129, 0.75), 0 0 16px 4px rgba(16, 185, 129, 0.4) !important;
  animation: memoPulseGlow 2.4s infinite ease-in-out;
}

@keyframes memoPulseGlow {
  0%, 100% {
    box-shadow: 0 0 6px 1px rgba(16, 185, 129, 0.65), 0 0 12px 2px rgba(16, 185, 129, 0.3);
  }
  50% {
    box-shadow: 0 0 12px 3px rgba(16, 185, 129, 0.9), 0 0 22px 6px rgba(16, 185, 129, 0.55);
  }
}

.place-marker-label.has-memo {
  background-color: rgba(236, 253, 245, 0.92) !important;
  border: 1px solid #10b981 !important;
  color: #065f46 !important;
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.3) !important;
  font-weight: 700 !important;
}

.place-marker-tooltip.has-memo {
  background: rgba(236, 253, 245, 0.95) !important;
  border: 1.5px solid #10b981 !important;
  color: #065f46 !important;
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.3) !important;
  font-weight: 700 !important;
}

/* ======================================================== */
/* 3D Flip Buttons & Floating Lounge Action Button          */
/* ======================================================== */
.btn-floating-lounge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 15;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 242, 254, 0.45);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 16px rgba(0, 242, 254, 0.25);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-floating-lounge:active {
  transform: scale(0.92);
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.25);
}

.btn-floating-lounge .live-pulse-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
}

.btn-floating-lounge .badge-live-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ff4e50;
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 10px;
  border: 2px solid var(--bg-dark);
}

.live-pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #00f2fe;
  border-radius: 50%;
  box-shadow: 0 0 8px #00f2fe;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 1; box-shadow: 0 0 12px #00f2fe; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.badge-live-count {
  background: #ff4e50;
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 2px;
}

.btn-user-profile {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}

.user-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  object-fit: cover;
}

.user-tier-badge {
  position: absolute;
  bottom: -2px;
  right: -4px;
  font-size: 12px;
  background: rgba(11, 15, 25, 0.9);
  border-radius: 50%;
  padding: 1px;
}

/* ======================================================== */
/* [PREMIUM] Chiang Mai Traveler Live Lounge System        */
/* ======================================================== */
/* Lounge Header */
.lounge-header {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.btn-flip-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-flip-back:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.btn-flip-back:active {
  transform: scale(0.96);
}

.lounge-title-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.lounge-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  padding: 1px 6px;
  border-radius: 12px;
  margin-bottom: 1px;
}

.pulse-live-indicator {
  width: 5px;
  height: 5px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
  animation: pulse-dot 1.4s infinite;
}

.lounge-main-title {
  font-weight: 800;
  font-size: 0.94rem;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.btn-write-post {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  border: none;
  color: #090d16;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 6px 13px;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0, 242, 254, 0.3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-write-post:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(0, 242, 254, 0.4);
}

.btn-write-post:active {
  transform: scale(0.96);
}

/* Location Scope Segment Control */
.location-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 16px;
  background: rgba(11, 15, 25, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  overflow-x: auto;
}

.location-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
}

.location-chips {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.03);
  padding: 2px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.loc-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: #8da2ba;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.loc-chip .loc-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #475569;
  transition: background 0.2s ease;
}

.loc-chip:hover {
  color: #e2e8f0;
}

.loc-chip.active {
  background: rgba(0, 242, 254, 0.12);
  color: #00f2fe;
  font-weight: 700;
}

.loc-chip.active .loc-dot {
  background: #00f2fe;
  box-shadow: 0 0 6px #00f2fe;
}

/* Lounge 3 Tabs Navigation */
.lounge-tabs {
  display: flex;
  background: rgba(11, 15, 25, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lounge-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px 9px 4px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #8da2ba;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.lounge-tab .tab-icon {
  font-size: 0.95rem;
  transition: transform 0.2s ease;
}

.lounge-tab:hover {
  color: #cbd5e1;
}

.lounge-tab.active {
  color: #00f2fe;
  border-bottom-color: #00f2fe;
  background: linear-gradient(180deg, rgba(0, 242, 254, 0.05) 0%, rgba(0, 242, 254, 0) 100%);
}

.lounge-tab.active .tab-icon {
  transform: translateY(-1px);
}

.tab-badge-lifecycle {
  font-size: 9px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
  color: #64748b;
}

.lounge-tab.active .tab-badge-lifecycle {
  background: rgba(0, 242, 254, 0.15);
  color: #00f2fe;
}

/* Feed Container */
.lounge-feed-container {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior-y: contain;
  padding: 14px 14px 120px 14px;
  position: relative;
  z-index: 5;
}

.lounge-feed-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
}

/* ======================================================== */
/* Premium Feed Card Component                             */
/* ======================================================== */
.feed-card {
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.feed-card:hover {
  border-color: rgba(0, 242, 254, 0.25);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* Feed Card Header */
.feed-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.feed-author-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.feed-avatar-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.feed-avatar-wrap:hover {
  transform: scale(1.08);
}

.feed-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(0, 242, 254, 0.4);
}

.feed-avatar-emoji {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.feed-author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.feed-author-name-line {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.feed-author-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease;
}

.feed-author-name:hover {
  color: #00f2fe;
}

/* Tier Badges */
.feed-tier-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 5px;
  cursor: pointer;
}

.tier-badge-lv4 {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.tier-badge-lv3 {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.tier-badge-lv2 {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
}

.tier-badge-lv1 {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}

.feed-meta-line {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: #64748b;
  white-space: nowrap;
}

.feed-timestamp {
  white-space: nowrap;
  flex-shrink: 0;
}

.feed-meta-dot {
  color: #475569;
  font-weight: 700;
}

.feed-lang-tag {
  font-size: 0.6rem;
  font-weight: 800;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  padding: 0 4px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.feed-dist-tag {
  color: #38bdf8;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Header Badges */
.feed-header-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.feed-tag-pill {
  font-size: 0.68rem;
  font-weight: 700;
  color: #00f2fe;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  padding: 1px 6px;
  border-radius: 6px;
}

.badge-lifecycle {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.badge-talk {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.badge-meetup {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #c084fc;
}

.badge-permanent {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

/* Feed Content */
.feed-card-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.feed-text-content {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #f1f5f9;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Mini Place Embed Card */
.feed-place-card {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 8px 11px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.feed-place-card:hover {
  background: rgba(0, 242, 254, 0.05);
  border-color: rgba(0, 242, 254, 0.3);
  transform: translateY(-1px);
}

.feed-place-card:active {
  transform: scale(0.98);
}

.feed-place-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex: 0 0 28px;
}

.feed-place-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feed-place-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.feed-place-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.feed-place-cat-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: #00f2fe;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.25);
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

.feed-place-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
}

.feed-place-dist {
  color: #38bdf8;
  font-weight: 600;
}

.feed-place-pin-cta {
  color: #8da2ba;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.feed-place-card:hover .feed-place-pin-cta {
  color: #00f2fe;
}

/* Meetup Meta Box */
.feed-meetup-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(168, 85, 247, 0.06);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 10px;
  padding: 8px 12px;
}

.meetup-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meetup-meta-item .meta-icon {
  font-size: 1.1rem;
}

.meetup-meta-item .meta-text {
  display: flex;
  flex-direction: column;
}

.meetup-meta-item .meta-label {
  font-size: 0.62rem;
  color: #c084fc;
  font-weight: 700;
  text-transform: uppercase;
}

.meetup-meta-item .meta-val {
  font-size: 0.8rem;
  color: #f3e8ff;
  font-weight: 700;
}

/* Photos Grid */
.feed-photos-grid {
  display: grid;
  gap: 6px;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 4px;
}

.feed-photos-grid.single-photo {
  grid-template-columns: 1fr;
}

.feed-photos-grid.single-photo .feed-photo-item {
  aspect-ratio: auto;
  max-height: 480px;
  width: 100%;
  background: #0b0f19;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.feed-photos-grid.single-photo .feed-photo-img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

.feed-photos-grid.multi-photos {
  grid-template-columns: repeat(2, 1fr);
}

.feed-photos-grid.multi-photos .feed-photo-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #0b0f19;
}

.feed-photos-grid.multi-photos .feed-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.feed-photo-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #0b0f19;
}

.feed-photo-img {
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}

.feed-photo-item:hover .feed-photo-img {
  transform: scale(1.02);
}

.feed-photo-more {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  font-weight: 800;
}

/* Feed Footer Actions */
.feed-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.feed-actions-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feed-btn-like,
.feed-btn-comment {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: #8da2ba;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.feed-btn-like:hover,
.feed-btn-comment:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
}

.feed-btn-like.active {
  color: #ff4e50;
}

.feed-btn-like .heart-icon {
  font-size: 0.88rem;
}

.feed-btn-comment .comment-icon {
  font-size: 0.88rem;
}

.feed-btn-edit {
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.25);
  color: #00f2fe;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-right: 4px;
}

.feed-btn-edit:hover {
  background: rgba(0, 242, 254, 0.22);
  color: #fff;
}

.feed-btn-delete {
  background: none;
  border: 1px solid transparent;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.feed-btn-delete:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

/* Empty State */
.feed-empty-state {
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.empty-icon-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-icon-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.25) 0%, transparent 70%);
  animation: pulse-dot 2.5s infinite;
}

.empty-icon-main {
  font-size: 2.8rem;
  position: relative;
  z-index: 2;
}

.empty-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.empty-desc {
  font-size: 0.84rem;
  color: #94a3b8;
  max-width: 320px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.btn-empty-cta {
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  border: none;
  color: #090d16;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 242, 254, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-empty-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 242, 254, 0.45);
}

/* ======================================================== */
/* Modals: Onboarding, Level, Write Post, Comments         */
/* ======================================================== */
.modal-onboarding-content {
  max-width: 420px;
  background: #0f172a;
  border: 1px solid var(--accent-cyan);
  box-shadow: 0 0 30px rgba(0, 242, 254, 0.2);
  padding: 24px;
}

.onboarding-header {
  text-align: center;
  margin-bottom: 20px;
}

.onboarding-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.onboarding-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 6px;
}

.onboarding-subtitle {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.4;
}

.gender-radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.gender-radio-card input {
  display: none;
}

.gender-card-btn {
  display: block;
  text-align: center;
  padding: 10px 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gender-radio-card input:checked + .gender-card-btn {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.onboarding-warning-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 0.75rem;
  color: #fca5a5;
  margin: 16px 0;
  line-height: 1.4;
}

.btn-onboarding-submit {
  width: 100%;
  padding: 12px;
  font-size: 0.95rem;
}

/* User Level Modal */
.modal-level-content {
  max-width: 400px;
  max-height: min(88dvh, 560px);
  border-radius: var(--radius-xl);
}

/* Public Profile Modal Styles */
.modal-public-profile-content {
  max-width: 380px;
  max-height: min(88dvh, 580px);
  border-radius: var(--radius-xl);
}

.public-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.public-avatar-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.pub-avatar-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0, 242, 254, 0.6);
  background: #0f172a;
}

.pub-tier-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  font-size: 16px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.public-profile-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pub-profile-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pub-tier-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
}

.pub-tier-tag {
  color: var(--accent-cyan);
  font-weight: 600;
}

.pub-joined-date {
  color: #64748b;
}

.pub-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.pub-stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.pub-stat-icon {
  font-size: 1.2rem;
}

.pub-stat-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.pub-stat-label {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
}

.pub-recent-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pub-recent-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #cbd5e1;
}

.pub-recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.pub-post-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pub-post-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
}

.pub-post-tag {
  color: var(--accent-cyan);
  font-weight: 600;
}

.pub-post-date {
  color: #64748b;
}

.pub-post-content {
  font-size: 0.82rem;
  color: #e2e8f0;
  line-height: 1.4;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pub-post-place {
  font-size: 0.72rem;
  color: #94a3b8;
}

.modal-level-body {
  padding: 14px 16px 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  scrollbar-width: none;
}

.modal-level-body::-webkit-scrollbar {
  display: none;
}

.user-tier-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.user-tier-avatar {
  position: relative;
}

.user-tier-avatar img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
}

.tier-modal-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  font-size: 15px;
}

.tier-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tier-user-name {
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
}

.btn-edit-nickname {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #38bdf8;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-edit-nickname:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
}

.nickname-edit-box {
  display: flex;
  gap: 6px;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  margin-bottom: 8px;
}

.nickname-input {
  flex: 1;
  font-size: 0.8rem;
  padding: 5px 8px;
}

.btn-save-nick {
  font-size: 0.75rem;
  padding: 5px 10px;
}

.btn-cancel-nick {
  font-size: 0.75rem;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

.nickname-lock-guide {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 2px;
  margin-bottom: 6px;
}

.tier-level-title {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.points-progress-section {
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.points-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.points-highlight {
  color: var(--accent-cyan);
  font-weight: 800;
}

.tier-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}

.tier-progress-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.tier-next-guide {
  font-size: 0.7rem;
  color: #94a3b8;
  text-align: right;
}

.tier-guide-table {
  font-size: 0.74rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.tier-guide-title {
  font-weight: 700;
  margin-bottom: 6px;
  color: #cbd5e1;
  font-size: 0.78rem;
}

.tier-perks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tier-perk-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  padding: 6px 8px;
  transition: all 0.2s ease;
}

.tier-perk-card.current-tier {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
}

.perk-header {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 2px;
}

.perk-pts {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: normal;
}

.perk-desc {
  font-size: 0.71rem;
  color: #94a3b8;
  line-height: 1.3;
}

.tier-perk-card.current-tier .perk-desc {
  color: #e2e8f0;
}

.loc-chip.loc-chip-locked {
  opacity: 0.7;
}

.loc-chip.loc-chip-locked:hover {
  border-color: #f59e0b;
}

.feed-card.feed-card-veteran {
  border-left: 3px solid #10b981;
}

.feed-card.feed-card-master {
  border-left: 3px solid #f59e0b;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.08);
}

.points-history-section {
  flex-shrink: 0;
}

.points-history-section .history-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 4px;
}

.points-history-list {
  max-height: 80px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  scrollbar-width: none;
}

.points-history-list::-webkit-scrollbar {
  display: none;
}

.point-log-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  padding: 3px 6px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
}

.point-change-plus,
.point-plus {
  color: #10b981;
  font-weight: 700;
}

.modal-level-footer {
  padding: 8px 16px 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #141a28;
  flex-shrink: 0;
}

.btn-level-logout {
  width: 100%;
  padding: 9px 0;
  font-size: 0.84rem;
}

/* Post Type Selector in Write Modal */
.post-type-selector {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post-type-btn input {
  display: none;
}

.post-type-btn span {
  display: block;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.post-type-btn input:checked + span {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.place-tag-input-row {
  display: flex;
  gap: 6px;
}

.btn-tool-clear {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--panel-border);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  padding: 0 10px;
  font-size: 0.75rem;
  cursor: pointer;
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qtag {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--panel-border);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  cursor: pointer;
}

.qtag.active {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.form-textarea {
  width: 100%;
  padding: 10px 12px;
  background: rgba(11, 15, 25, 0.7);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  resize: none;
  box-sizing: border-box;
}

.btn-photo-upload-label {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  color: var(--text-primary);
  cursor: pointer;
}

.photo-preview-strip {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  overflow-x: auto;
}

.preview-thumb-box {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

.preview-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.btn-remove-thumb {
  position: absolute;
  top: -4px;
  right: -4px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Comments Modal UI */
.comments-list-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 12px;
}

.comment-bubble {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.comment-author-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comment-author-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #f1f5f9;
  cursor: pointer;
  transition: color 0.15s ease;
}

.comment-author-name:hover {
  color: #00f2fe;
}

.comment-time {
  font-size: 0.7rem;
  color: #64748b;
}

.comment-body {
  font-size: 0.85rem;
  color: #e2e8f0;
  line-height: 1.4;
}

.comment-input-form {
  padding-top: 10px;
  border-top: 1px solid var(--panel-border);
}

.comment-input-row {
  display: flex;
  gap: 8px;
}

.btn-comment-send {
  padding: 8px 16px;
}

/* ======================================================== */
/* [INFINITE SCROLL] Feed Loader, Spinner & End Banner      */
/* ======================================================== */
.feed-infinite-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  animation: fadeIn 0.2s ease;
}

.feed-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(0, 242, 254, 0.2);
  border-top-color: #00f2fe;
  border-radius: 50%;
  animation: spinLoader 0.7s linear infinite;
}

@keyframes spinLoader {
  to { transform: rotate(360deg); }
}

.feed-end-banner {
  text-align: center;
  padding: 20px 16px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 500;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  margin-top: 10px;
  animation: fadeIn 0.3s ease;
}

.feed-sentinel {
  width: 100%;
  height: 20px;
  pointer-events: none;
}