:root {
  --bg-glass: rgba(34, 24, 18, 0.72);
  --bg-glass-strong: rgba(28, 20, 15, 0.88);
  --border-warm: rgba(235, 198, 152, 0.22);
  --accent-amber: #eab367;
  --accent-green: #8ad67a;
  --text-main: #f7efe5;
  --text-muted: #cbbba7;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #c9c3b8;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  color: var(--text-main);
  user-select: none;
}

/* Entrance Hanji Pine Splash Screen */
.intro-splash {
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: #c9c3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.85s ease;
}

.intro-splash.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-splash-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
  animation: introBreathe 2.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@media (min-width: 768px) {
  .intro-splash-img {
    object-fit: contain;
    max-width: 560px;
    margin: 0 auto;
    filter: drop-shadow(0 12px 36px rgba(35, 24, 18, 0.16));
  }
}

@keyframes introBreathe {
  0% { transform: scale(1.045); opacity: 0.72; }
  100% { transform: scale(1.0); opacity: 1; }
}

.intro-sunbeam {
  position: absolute;
  inset: -20%;
  background: radial-gradient(ellipse at 32% 18%, rgba(255, 247, 224, 0.42) 0%, rgba(255, 238, 194, 0.14) 36%, transparent 68%);
  pointer-events: none;
  animation: sunDrift 3.6s ease-in-out infinite alternate;
}

@keyframes sunDrift {
  0% { transform: translate(-3%, -2%) scale(1); opacity: 0.7; }
  100% { transform: translate(4%, 3%) scale(1.08); opacity: 1; }
}

.intro-motes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.intro-motes span {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 250, 224, 0.95), rgba(245, 200, 110, 0.35) 60%, transparent);
  box-shadow: 0 0 10px rgba(255, 236, 179, 0.75);
  animation: moteFloat 4.2s ease-in-out infinite;
  opacity: 0;
}

.intro-motes span:nth-child(1) { left: 18%; top: 24%; animation-delay: 0.1s; width: 4px; height: 4px; }
.intro-motes span:nth-child(2) { left: 74%; top: 20%; animation-delay: 0.6s; width: 6px; height: 6px; }
.intro-motes span:nth-child(3) { left: 42%; top: 16%; animation-delay: 1.1s; width: 5px; height: 5px; }
.intro-motes span:nth-child(4) { left: 82%; top: 44%; animation-delay: 0.3s; width: 4px; height: 4px; }
.intro-motes span:nth-child(5) { left: 26%; top: 58%; animation-delay: 0.9s; width: 6px; height: 6px; }
.intro-motes span:nth-child(6) { left: 64%; top: 68%; animation-delay: 0.4s; width: 4px; height: 4px; }
.intro-motes span:nth-child(7) { left: 34%; top: 76%; animation-delay: 1.4s; width: 5px; height: 5px; }
.intro-motes span:nth-child(8) { left: 78%; top: 78%; animation-delay: 0.8s; width: 5px; height: 5px; }
.intro-motes span:nth-child(9) { left: 52%; top: 32%; animation-delay: 1.7s; width: 4px; height: 4px; }
.intro-motes span:nth-child(10) { left: 14%; top: 72%; animation-delay: 1.2s; width: 5px; height: 5px; }

@keyframes moteFloat {
  0% { transform: translateY(10px) scale(0.6); opacity: 0; }
  35% { opacity: 0.85; }
  70% { opacity: 0.55; }
  100% { transform: translateY(-22px) scale(1.1); opacity: 0; }
}

.intro-footer {
  position: absolute;
  bottom: max(28px, env(safe-area-inset-bottom, 24px));
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

.intro-brand {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: rgba(45, 38, 30, 0.78);
}

.intro-hint {
  margin-top: 4px;
  font-size: 11px;
  color: rgba(45, 38, 30, 0.48);
}

.intro-credit {
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(45, 38, 30, 0.44);
  white-space: nowrap;
}

.intro-disclaimer {
  margin-top: 4px;
  font-size: 9.5px;
  line-height: 1.4;
  color: rgba(45, 38, 30, 0.42);
  max-width: 88vw;
  word-break: keep-all;
}

#canvas-container {
  position: fixed;
  inset: 0;
  z-index: 1;
}

/* Top HUD */
.top-hud {
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
  flex-wrap: wrap;
}

.top-hud > * {
  pointer-events: auto;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-warm);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.dot-live {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
}

.brand-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.camera-presets {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-warm);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  overflow-x: auto;
  max-width: 100%;
}

.cam-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.cam-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.cam-btn.active {
  background: linear-gradient(135deg, #d79346, #b76f2a);
  color: #fff;
  box-shadow: 0 4px 12px rgba(215, 147, 70, 0.35);
}

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

.icon-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid var(--border-warm);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.icon-pill:hover {
  background: rgba(62, 43, 30, 0.85);
  transform: translateY(-1px);
}

.icon-pill.primary {
  background: rgba(138, 214, 122, 0.18);
  border-color: rgba(138, 214, 122, 0.45);
  color: #d6f5ce;
}

.icon-pill.primary:hover {
  background: rgba(138, 214, 122, 0.3);
}

/* Hover Tooltip */
#hover-tooltip {
  position: fixed;
  z-index: 25;
  pointer-events: none;
  padding: 7px 12px;
  background: rgba(22, 15, 11, 0.92);
  border: 1px solid var(--accent-amber);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  transform: translate(12px, -24px);
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

/* Bottom Hint & Mini Player */
.controls-hint {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  padding: 7px 16px;
  background: rgba(24, 17, 13, 0.65);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-warm);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  pointer-events: none;
}

.mini-player {
  position: fixed;
  bottom: 18px;
  left: 18px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-warm);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.38);
  max-width: 280px;
}

.play-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #eab367, #c2782d);
  color: #1f140d;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: transform 0.15s ease;
}

.play-circle:hover {
  transform: scale(1.06);
}

.track-meta {
  cursor: pointer;
  overflow: hidden;
}

.track-title {
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
  opacity: 0.35;
}

.eq-bars.playing {
  opacity: 1;
}

.eq-bars span {
  width: 3px;
  height: 5px;
  background: var(--accent-amber);
  border-radius: 2px;
}

.eq-bars.playing span:nth-child(1) { animation: eq 0.7s infinite ease-in-out alternate; }
.eq-bars.playing span:nth-child(2) { animation: eq 0.5s 0.2s infinite ease-in-out alternate; }
.eq-bars.playing span:nth-child(3) { animation: eq 0.8s 0.1s infinite ease-in-out alternate; }

@keyframes eq {
  from { height: 4px; }
  to { height: 16px; }
}

/* Right Inspector Drawer */
.inspector {
  position: fixed;
  top: 80px;
  right: 18px;
  bottom: 24px;
  width: 370px;
  max-width: calc(100vw - 36px);
  z-index: 15;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(22px);
  border: 1px solid var(--border-warm);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideIn 0.22s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

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

.badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(234, 179, 103, 0.2);
  color: var(--accent-amber);
  border: 1px solid rgba(234, 179, 103, 0.35);
}

.badge.green {
  background: rgba(138, 214, 122, 0.18);
  color: var(--accent-green);
  border-color: rgba(138, 214, 122, 0.4);
}

.badge.private {
  background: rgba(220, 38, 38, 0.24);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.65);
}

.close-btn {
  background: rgba(255,255,255,0.07);
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}

.close-btn:hover {
  background: rgba(255,255,255,0.16);
  color: #fff;
}

.inspector-body {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
  user-select: text;
}

.inspector-body h2 {
  font-size: 19px;
  line-height: 1.35;
  margin-bottom: 6px;
}

.meta-line {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.note-box {
  background: rgba(255, 248, 238, 0.06);
  border-left: 3px solid var(--accent-amber);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.65;
  margin-bottom: 16px;
  color: #f0e4d4;
}

.progress-wrap {
  margin-bottom: 16px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.progress-bar {
  height: 7px;
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #eab367, #8ad67a);
  border-radius: 999px;
}

.shelf-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.shelf-list-item:hover {
  background: rgba(234, 179, 103, 0.14);
}

.shelf-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-amber);
  margin: 14px 0 8px;
  text-transform: uppercase;
}

.action-btn {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border-warm);
  background: rgba(234, 179, 103, 0.16);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s;
}

.action-btn:hover {
  background: rgba(234, 179, 103, 0.28);
}

.action-btn.green {
  background: rgba(138, 214, 122, 0.16);
  border-color: rgba(138, 214, 122, 0.4);
  color: #dcf8d5;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 13px;
}

.pill-on { color: #8ad67a; font-weight: 700; }
.pill-off { color: #e2807a; font-weight: 700; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(10, 6, 4, 0.72);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  background: #241913;
  border: 1px solid var(--border-warm);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.65);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

form label {
  display: block;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

form input, form select, form textarea {
  width: 100%;
  margin-top: 5px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-warm);
  background: rgba(0,0,0,0.3);
  color: var(--text-main);
  font-size: 13.5px;
  font-family: inherit;
}

.btn-submit {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #d79346, #b76f2a);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* 3D Projected World Labels */
#labels-layer {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
}

.world-label {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(26, 18, 13, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(234, 179, 103, 0.55);
  color: #f9efe1;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.45);
  transition: transform 0.15s ease, background 0.15s ease;
}

.world-label:hover, .world-label.near {
  background: rgba(215, 147, 70, 0.95);
  color: #1c120c;
  border-color: #fff;
  transform: translate(-50%, -108%) scale(1.06);
}

.world-label.green {
  border-color: rgba(138, 214, 122, 0.75);
}

.world-label.green.near {
  background: rgba(138, 214, 122, 0.95);
  color: #0e1e0b;
}

.world-label.private {
  background: rgba(48, 12, 16, 0.9);
  border: 1.5px dashed rgba(248, 113, 113, 0.85);
  color: #fecaca;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.32);
}

.world-label.private:hover, .world-label.private.near {
  background: rgba(220, 38, 38, 0.95);
  color: #ffffff;
  border: 1.5px solid #fecaca;
}

.icon-pill.owner-unlocked {
  background: rgba(220, 38, 38, 0.24);
  border: 1px dashed rgba(248, 113, 113, 0.8);
  color: #fecaca;
  font-weight: 800;
}

.icon-pill.owner-unlocked:hover {
  background: rgba(220, 38, 38, 0.42);
  color: #fff;
}

/* Proximity Action Prompt */
.proximity-cta {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 14;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid rgba(255, 232, 188, 0.8);
  background: linear-gradient(135deg, #e5a352, #b86c25);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 0 20px rgba(234, 179, 103, 0.4);
  animation: pulseCta 1.6s infinite ease-in-out;
  white-space: nowrap;
}

@keyframes pulseCta {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.04); }
}

/* Virtual Joystick (Bottom Left) */
.joystick-zone {
  position: fixed;
  bottom: 22px;
  left: 22px;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: rgba(34, 24, 18, 0.58);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(234, 179, 103, 0.35);
  z-index: 13;
  touch-action: none;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.joystick-knob {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #eab367, #c2782d);
  color: #1f140d;
  font-size: 18px;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.45);
  pointer-events: none;
  transition: transform 0.05s linear;
}

/* Move mini-player cleanly to bottom-right so joystick stays bottom-left */
.mini-player {
  left: auto;
  right: 18px;
  bottom: 18px;
}

@media (max-width: 768px) {
  .brand-badge { display: none; }
  .joystick-zone { bottom: 16px; left: 16px; width: 96px; height: 96px; }
  .joystick-knob { width: 40px; height: 40px; font-size: 16px; }
  .mini-player {
    bottom: 16px;
    right: 14px;
    left: 126px;
    max-width: none;
    padding: 8px 12px;
  }
  .proximity-cta {
    bottom: 124px;
    font-size: 13px;
    padding: 10px 18px;
  }
  .inspector {
    top: auto;
    bottom: 84px;
    max-height: 56vh;
    left: 12px;
    right: 12px;
    width: auto;
  }
}

/* ==========================================================================
   Visitor HUD & Guestbook Styling
   ========================================================================== */
.visitor-hud {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-warm);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-muted);
}

.v-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  animation: pulse-green 2s infinite ease-in-out;
}

@keyframes pulse-green {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.visitor-hud strong {
  color: var(--accent-amber);
  font-weight: 700;
}

.icon-pill.ghost {
  background: rgba(234, 179, 103, 0.12);
  border: 1px solid rgba(234, 179, 103, 0.35);
  color: var(--accent-amber);
}

.icon-pill.ghost:hover {
  background: rgba(234, 179, 103, 0.22);
}

.badge-mini {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent-amber);
  color: #1a120d;
  font-size: 11px;
  font-weight: 700;
  margin-left: 2px;
}

/* Guestbook Modal */
.guestbook-card {
  max-width: 640px;
  width: 94vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 16px 16px 14px;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Write Form — Analog Post-it Composer */
.gb-write-form {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-warm);
  border-radius: 12px;
  padding: 14px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gb-write-form.gb-postit-composer {
  position: relative;
  background: #fef3a7;
  color: #29221c;
  border: 1px solid rgba(74, 56, 36, 0.18);
  border-radius: 4px 4px 18px 4px;
  padding: 13px 13px 10px;
  margin-top: 12px;
  gap: 7px;
  transform: rotate(-0.45deg);
  box-shadow:
    0 9px 20px rgba(0, 0, 0, 0.38),
    inset 0 -12px 20px rgba(138, 102, 42, 0.1);
  transition: background-color 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.gb-write-form.gb-postit-composer::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(-1.5deg);
  width: 54px;
  height: 15px;
  background: rgba(255, 253, 245, 0.62);
  border: 1px solid rgba(74, 56, 36, 0.12);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.16);
  border-radius: 2px;
  pointer-events: none;
}

.gb-write-form.gb-postit-composer::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, rgba(74, 56, 36, 0.14) 0%, rgba(255, 255, 255, 0.48) 50%, rgba(0, 0, 0, 0.08) 51%, transparent 100%);
  border-bottom-right-radius: 18px;
  pointer-events: none;
}

.gb-write-form.gb-postit-composer:focus-within {
  transform: rotate(0deg) translateY(-1px);
  box-shadow:
    0 13px 26px rgba(0, 0, 0, 0.46),
    inset 0 -10px 18px rgba(138, 102, 42, 0.08);
}

.gb-composer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: nowrap;
}

.gb-color-picker {
  display: flex;
  align-items: center;
  gap: 5px;
}

.color-opt {
  cursor: pointer;
  display: inline-flex;
}

.color-opt input {
  display: none;
}

.color-opt span {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1.5px solid rgba(41, 34, 28, 0.24);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.color-opt input:checked + span {
  border-color: #29221c;
  transform: scale(1.18);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.78), 0 2px 4px rgba(0, 0, 0, 0.22);
}

.gb-from-label {
  font-size: 12px;
  font-weight: 800;
  font-style: italic;
  color: #6b5640;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.gb-postit-composer .gb-input-nick-wrap input {
  background: transparent;
  border: none;
  border-bottom: 1.5px dashed rgba(68, 52, 34, 0.36);
  border-radius: 0;
  padding: 3px 4px;
  color: #261e17;
  font-weight: 700;
  font-size: 13px;
}

.gb-postit-composer .gb-input-nick-wrap input::placeholder {
  color: rgba(82, 65, 48, 0.52);
  font-weight: 500;
}

.gb-postit-composer .gb-input-nick-wrap input:focus {
  border-bottom-color: #9a5818;
}

.gb-postit-composer .btn-dice {
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(68, 52, 34, 0.22);
  color: #3d2e20;
  padding: 3px 7px;
  font-size: 12px;
}

.gb-postit-composer .btn-dice:hover {
  background: rgba(255, 255, 255, 0.85);
}

.gb-postit-composer .gb-icon-picker {
  gap: 3px;
}

.gb-postit-composer .icon-opt span {
  width: 24px;
  height: 24px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(68, 52, 34, 0.14);
}

.gb-postit-composer .icon-opt input:checked + span {
  background: rgba(255, 255, 255, 0.92);
  border-color: #9a5818;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.14);
}

.gb-postit-composer .gb-textarea-wrap textarea {
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent 21px,
      rgba(94, 72, 46, 0.16) 21px,
      rgba(94, 72, 46, 0.16) 22px
    );
  background-color: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(74, 56, 36, 0.16);
  border-radius: 6px;
  color: #241c15;
  font-size: 13px;
  line-height: 22px;
  padding: 5px 9px;
  min-height: 50px;
}

.gb-postit-composer .gb-textarea-wrap textarea::placeholder {
  color: rgba(82, 65, 48, 0.58);
}

.gb-postit-composer .gb-textarea-wrap textarea:focus {
  border-color: rgba(154, 88, 24, 0.55);
  background-color: rgba(255, 255, 255, 0.45);
}

.gb-postit-composer .gb-secret-check {
  color: #4f3e2d;
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.gb-postit-composer .gb-secret-check input {
  accent-color: #b45309;
}

.gb-postit-submit {
  background: linear-gradient(135deg, #3c2a1e, #241811) !important;
  color: #fef3c7 !important;
  border: 1px solid rgba(255, 243, 199, 0.25) !important;
  padding: 7px 14px !important;
  border-radius: 8px !important;
  font-weight: 800 !important;
  font-size: 12.5px !important;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(36, 24, 17, 0.26);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gb-postit-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(36, 24, 17, 0.36);
}

.gb-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.gb-input-nick-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 180px;
}

.gb-input-nick-wrap input {
  flex: 1;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(235, 198, 152, 0.25);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 13px;
}

.btn-dice {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(234, 179, 103, 0.15);
  border: 1px solid rgba(234, 179, 103, 0.3);
  color: var(--accent-amber);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-dice:hover {
  background: rgba(234, 179, 103, 0.28);
  transform: rotate(15deg);
}

.gb-icon-picker {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-opt {
  cursor: pointer;
}

.icon-opt input {
  display: none;
}

.icon-opt span {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  font-size: 16px;
  transition: all 0.15s;
}

.icon-opt input:checked + span {
  background: rgba(234, 179, 103, 0.25);
  border-color: var(--accent-amber);
  transform: scale(1.12);
}

.gb-textarea-wrap textarea {
  width: 100%;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(235, 198, 152, 0.25);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 13px;
  resize: none;
  font-family: inherit;
}

.gb-textarea-wrap textarea:focus,
.gb-input-nick-wrap input:focus {
  outline: none;
  border-color: var(--accent-amber);
}

.gb-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  gap: 12px;
}

.gb-secret-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
}

.gb-secret-check input {
  accent-color: var(--accent-amber);
  cursor: pointer;
}

/* Feed List */
.gb-feed-container {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.gb-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.gb-feed-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-text-action {
  background: none;
  border: none;
  color: var(--accent-amber);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
}

.btn-text-action:hover {
  text-decoration: underline;
}

.gb-feed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: 360px;
  padding-right: 4px;
}

.gb-feed-list.gb-postit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 10px;
  padding: 12px 4px 8px;
  align-items: stretch;
  overflow-y: visible;
  max-height: none;
}

.gb-card-item.gb-postit-note {
  position: relative;
  border: 1px solid rgba(41, 34, 28, 0.14);
  border-radius: 3px 3px 12px 3px;
  padding: 13px 10px 9px;
  min-height: 112px;
  color: #29221c;
  cursor: pointer;
  justify-content: space-between;
  gap: 5px;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.3), inset 0 -8px 14px rgba(120, 90, 45, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.gb-card-item.gb-postit-note::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(-1.5deg);
  width: 34px;
  height: 11px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(41, 34, 28, 0.08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
  border-radius: 2px;
  pointer-events: none;
}

.gb-card-item.gb-postit-note:hover {
  transform: rotate(0deg) translateY(-2px) scale(1.02) !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.42);
  border-color: rgba(180, 118, 36, 0.45);
}

.gb-card-item.gb-postit-note.pinned {
  border: 1.5px solid #d97706;
  box-shadow: 0 6px 14px rgba(217, 119, 6, 0.25);
}

.gb-postit-note .gb-item-head {
  gap: 4px;
  min-width: 0;
}

.gb-postit-note .gb-author-wrap {
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.gb-postit-note .gb-icon-avatar {
  font-size: 13px;
  flex-shrink: 0;
}

.gb-postit-note .gb-author-name {
  color: #1f1914;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gb-postit-note .gb-mini-flags {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10.5px;
  flex-shrink: 0;
}

.gb-postit-note .gb-item-date {
  color: #6b5d50;
  font-size: 10px;
  white-space: nowrap;
}

.gb-postit-note .gb-item-body {
  color: #2c241d;
  font-size: 11.8px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  flex: 1;
}

.gb-postit-note .gb-item-foot {
  margin-top: 2px;
  gap: 4px;
}

.gb-postit-note .gb-mini-meta {
  font-size: 10px;
  color: #6b5d50;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.gb-postit-note .gb-badge-pinned {
  background: rgba(217, 119, 6, 0.18);
  color: #92400e;
  border-color: rgba(217, 119, 6, 0.45);
}

.gb-postit-note .gb-like-btn {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(41, 34, 28, 0.15);
  color: #4a3d33;
  font-size: 10.5px;
  padding: 2px 6px;
}

.gb-postit-note .gb-like-btn:hover,
.gb-postit-note .gb-like-btn.liked {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(225, 29, 72, 0.45);
  color: #be123c;
}

.gb-postit-note .gb-reply-box {
  background: rgba(255, 255, 255, 0.62);
  border-left: 3px solid #d97706;
  color: #362c24;
  font-size: 11.5px;
}

.gb-postit-note .gb-reply-box strong {
  color: #b45309;
}

/* Expanded Post-it Lightbox */
.gb-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 260;
  background: rgba(12, 8, 6, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: gbZoomFade 0.16s ease-out;
}

.gb-zoom-overlay.hidden {
  display: none !important;
}

@keyframes gbZoomFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.gb-zoom-card {
  position: relative;
  width: 100%;
  max-width: 390px;
  min-height: 250px;
  border-radius: 5px 5px 24px 5px;
  padding: 24px 20px 18px;
  color: #261e17;
  border: 1px solid rgba(68, 52, 34, 0.2);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.62), inset 0 -18px 28px rgba(138, 102, 42, 0.12);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: rotate(-0.5deg);
  animation: gbZoomPop 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.gb-zoom-card::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%) rotate(-1.5deg);
  width: 72px;
  height: 22px;
  background: rgba(255, 253, 245, 0.65);
  border: 1px solid rgba(68, 52, 34, 0.12);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  border-radius: 2px;
  pointer-events: none;
}

@keyframes gbZoomPop {
  from { opacity: 0; transform: scale(0.84) rotate(-2deg); }
  to { opacity: 1; transform: scale(1) rotate(-0.5deg); }
}

.gb-zoom-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1.5px dashed rgba(68, 52, 34, 0.24);
  padding-bottom: 8px;
}

.gb-zoom-author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 800;
  color: #1f1914;
  min-width: 0;
}

.gb-zoom-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(41, 34, 28, 0.2);
  background: rgba(255, 255, 255, 0.65);
  color: #29221c;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.gb-zoom-body {
  font-size: 14.5px;
  line-height: 25px;
  color: #241c15;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 6px 2px;
  min-height: 92px;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent 24px,
      rgba(94, 72, 46, 0.14) 24px,
      rgba(94, 72, 46, 0.14) 25px
    );
}

.gb-zoom-meta {
  font-size: 11.5px;
  color: #6b5d50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gb-zoom-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(68, 52, 34, 0.12);
}

.gb-zoom-card .gb-like-btn {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(41, 34, 28, 0.18);
  color: #3d2e20;
  font-weight: 700;
}

.gb-zoom-card .gb-like-btn.liked,
.gb-zoom-card .gb-like-btn:hover {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(225, 29, 72, 0.45);
  color: #be123c;
}

.gb-zoom-card .gb-reply-box {
  background: rgba(255, 255, 255, 0.68);
  border-left: 3px solid #d97706;
  color: #2f261e;
  font-size: 12.5px;
}

.gb-zoom-card .gb-reply-box strong {
  color: #b45309;
}

.gb-maum-banner {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed rgba(235, 198, 152, 0.22);
  text-align: center;
}

.gb-maum-banner a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(234, 179, 103, 0.1);
  border: 1px solid rgba(234, 179, 103, 0.28);
  color: #f6d7a7;
  font-size: 11.5px;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.gb-maum-banner a:hover {
  background: rgba(234, 179, 103, 0.22);
  border-color: rgba(234, 179, 103, 0.55);
  color: #fff;
}

@media (max-width: 560px) {
  .gb-feed-list.gb-postit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 8px;
  }
}

.gb-feed-list::-webkit-scrollbar {
  width: 6px;
}

.gb-feed-list::-webkit-scrollbar-thumb {
  background: rgba(234, 179, 103, 0.3);
  border-radius: 3px;
}

.gb-card-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(235, 198, 152, 0.15);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.15s, border-color 0.15s;
}

.gb-card-item:hover {
  border-color: rgba(234, 179, 103, 0.35);
  transform: translateY(-1px);
}

.gb-card-item.pinned {
  background: linear-gradient(135deg, rgba(234, 179, 103, 0.12), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(234, 179, 103, 0.45);
}

.gb-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gb-author-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gb-icon-avatar {
  font-size: 18px;
  line-height: 1;
}

.gb-author-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
}

.gb-badge-pinned {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(234, 179, 103, 0.25);
  color: var(--accent-amber);
  border: 1px solid var(--accent-amber);
  margin-left: 4px;
}

.gb-item-date {
  font-size: 11px;
  color: var(--text-muted);
}

.gb-item-body {
  font-size: 13px;
  line-height: 1.55;
  color: #eeddd0;
  word-break: break-word;
}

.gb-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.gb-like-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.gb-like-btn:hover {
  background: rgba(234, 179, 103, 0.18);
  border-color: var(--accent-amber);
  color: var(--accent-amber);
}

.gb-like-btn.liked {
  background: rgba(234, 179, 103, 0.22);
  border-color: var(--accent-amber);
  color: var(--accent-amber);
}

.gb-reply-box {
  margin-top: 6px;
  padding: 8px 10px;
  background: rgba(234, 179, 103, 0.08);
  border-left: 3px solid var(--accent-amber);
  border-radius: 4px;
  font-size: 12px;
  color: #f1dfcf;
}

.gb-reply-box strong {
  color: var(--accent-amber);
}

@media (max-width: 768px) {
  .visitor-hud .v-text { display: none; }
  .visitor-hud { padding: 6px 9px; flex-shrink: 0; }
  .top-actions {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 6px;
    padding-bottom: 2px;
  }
  .top-actions::-webkit-scrollbar { display: none; }
  .icon-pill {
    padding: 7px 11px;
    font-size: 11.5px;
    line-height: 1.1;
  }
  .guestbook-card { padding: 14px; }
  .gb-feed-list:not(.gb-postit-grid) { max-height: 240px; }
}




/* Semantic Search UI */
.chip-tag { display: inline-block; padding: 3px 8px; background: rgba(52, 211, 153, 0.1); color: #6ee7b7; border: 1px solid rgba(52, 211, 153, 0.25); border-radius: 12px; cursor: pointer; white-space: nowrap; font-size: 11px; transition: all 0.2s; }
.chip-tag:hover { background: rgba(52, 211, 153, 0.25); color: #fff; border-color: #34d399; }
.pill-btn { background: rgba(30, 41, 59, 0.8); color: #cbd5e1; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 6px; cursor: pointer; transition: all 0.15s; }
.pill-btn:hover { border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.pill-btn.active { background: #10b981 !important; color: #fff !important; border-color: #34d399 !important; font-weight: 700; }


/* Mobile-optimized Investment Card */
.invest-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.15s ease;
}
.invest-card:hover, .invest-card:active {
  background: rgba(30, 41, 59, 0.95) !important;
  border-color: rgba(52, 211, 153, 0.45) !important;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
