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

body {
  font-family: 'Lora', Georgia, serif;
  background: #0a0a1a;
  color: #fff;
  height: 100dvh;
  overflow: hidden;
}

/* Full-screen globe background */
#globe-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}

/* Side panel */
#panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 340px;
  height: 100dvh;
  z-index: 10;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 28px 22px;
  background: rgba(10, 10, 26, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 215, 0, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#app {
  width: 100%;
}

#app.hidden {
  display: none;
}

header {
  margin-bottom: 20px;
}

header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFD700;
  line-height: 1.2;
}

header p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 4px;
}

.form-group {
  margin-bottom: 14px;
}

label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

input[type="text"],
input[type="date"],
input[type="time"] {
  width: 100%;
  padding: 10px 10px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 6px;
  outline: none;
  -webkit-appearance: none;
  transition: border-color 0.15s;
}

input:focus {
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.1);
}

input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.5;
}

.date-time-row {
  display: flex;
  gap: 8px;
}

.date-time-row input[type="date"] {
  flex: 3;
}

.date-time-row input[type="time"] {
  flex: 2;
}

.quick-picks {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.quick-btn {
  padding: 4px 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.quick-btn:hover {
  border-color: rgba(255, 215, 0, 0.3);
  color: rgba(255, 215, 0, 0.7);
}

.quick-btn:active {
  background: rgba(255, 215, 0, 0.1);
  border-color: #FFD700;
  color: #FFD700;
}

.cutoff-options {
  display: flex;
  gap: 0;
}

.cutoff-btn {
  flex: 1;
  padding: 7px 4px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.cutoff-btn:first-child {
  border-radius: 6px 0 0 6px;
}

.cutoff-btn:last-child {
  border-radius: 0 6px 6px 0;
}

.cutoff-btn:not(:last-child) {
  border-right: none;
}

.cutoff-btn.active {
  background: rgba(255, 215, 0, 0.12);
  border-color: rgba(255, 215, 0, 0.4);
  color: #FFD700;
}

.cutoff-btn.active + .cutoff-btn {
  border-left-color: rgba(255, 215, 0, 0.4);
}

.hint-inline {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.25);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

#create-btn {
  width: 100%;
  padding: 12px;
  background: #FFD700;
  color: #000;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.15s, transform 0.1s;
}

#create-btn:hover {
  background: #ffe033;
}

#create-btn:active {
  background: #e6c200;
  transform: scale(0.98);
}

#create-btn:disabled {
  background: #444;
  color: #888;
  cursor: not-allowed;
}

/* Share screen */
#share-screen {
  width: 100%;
  text-align: center;
}

#share-screen.hidden {
  display: none;
}

.share-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

#share-screen h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #FFD700;
  margin-bottom: 2px;
}

#share-screen > p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 20px;
}

.share-link-group {
  text-align: left;
  margin-bottom: 14px;
}

.link-row {
  display: flex;
  gap: 6px;
}

.link-row input {
  flex: 1;
  padding: 8px 10px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 6px;
  outline: none;
}

.copy-btn {
  padding: 8px 12px;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  color: #FFD700;
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.copy-btn:hover {
  background: rgba(255, 215, 0, 0.2);
}

.share-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-primary,
.btn-secondary {
  flex: 1;
  display: block;
  padding: 10px;
  text-align: center;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-primary {
  background: #FFD700;
  color: #000;
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255, 215, 0, 0.4);
  color: #FFD700;
}

.btn-primary:hover {
  background: #ffe033;
}

.btn-secondary:hover {
  background: rgba(255, 215, 0, 0.08);
}

/* Detail panel — click-persistent mission info */
#detail-panel {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 100;
  background: rgba(10, 10, 26, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 10px;
  padding: 14px 18px;
  min-width: 200px;
  max-width: 320px;
  animation: panelIn 0.2s ease;
}

#detail-panel.hidden {
  display: none;
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

#detail-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

#detail-close:hover {
  color: #fff;
}

.detail-mission-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: #FFD700;
  margin-bottom: 4px;
  padding-right: 20px;
}

.detail-president {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.detail-president:empty {
  display: none;
}

.detail-country {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 2px;
}

.detail-country:empty {
  display: none;
}

/* Mobile: bottom sheet */
@media (max-width: 600px) {
  #panel {
    width: 100%;
    height: auto;
    max-height: 70dvh;
    top: auto;
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: 1px solid rgba(255, 215, 0, 0.12);
    border-radius: 16px 16px 0 0;
    padding: 20px 18px;
    justify-content: flex-start;
  }

  header h1 {
    font-size: 1.15rem;
  }

  .share-actions {
    flex-direction: column;
  }

  .cutoff-btn {
    font-size: 0.62rem;
    padding: 6px 2px;
  }

  #detail-panel {
    bottom: auto;
    top: 12px;
    left: 12px;
    right: 12px;
    max-width: none;
  }
}
