* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f5f6f8;
  color: #1a1d23;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e2e5ea;
}

.logo {
  font-size: 16px;
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-item {
  border: none;
  background: none;
  font-size: 14px;
  font-family: inherit;
  color: #1a1d23;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
}

.nav-item:hover {
  background: #eef0f3;
}

.nav-item:disabled {
  color: #b0b5bd;
  cursor: not-allowed;
}

.nav-item:disabled:hover {
  background: none;
}

.auth-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-user {
  font-size: 13px;
  color: #4a4f57;
}

.auth-btn {
  border: 1px solid #d7dae0;
  background: #ffffff;
  font-size: 13px;
  font-family: inherit;
  color: #1a1d23;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 6px;
}

.auth-btn:hover {
  background: #eef0f3;
}

.auth-btn:disabled {
  color: #b0b5bd;
  cursor: not-allowed;
  background: #f5f6f8;
}

.auth-error {
  background: #fdecea;
  color: #92251c;
  font-size: 13px;
  padding: 10px 24px;
  border-bottom: 1px solid #f4c6c0;
}

.content {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px;
}

.placeholder {
  color: #8a8f98;
  font-size: 14px;
  line-height: 1.6;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay.hidden {
  display: none;
}

.hidden {
  display: none;
}

.panel {
  background: #ffffff;
  border-radius: 8px;
  width: min(480px, 90vw);
  height: min(640px, 85vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e5ea;
  font-size: 14px;
  font-weight: 600;
}

.close-btn {
  border: none;
  background: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #8a8f98;
  padding: 0 4px;
}

.close-btn:hover {
  color: #1a1d23;
}

.capsule-frame {
  flex: 1;
  border: none;
  width: 100%;
  height: 100%;
}
